bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/21038] Incorrect unwind info for BND PLT


From: cvs-commit at gcc dot gnu.org
Subject: [Bug ld/21038] Incorrect unwind info for BND PLT
Date: Fri, 13 Jan 2017 16:55:02 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=21038

--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The binutils-2_28-branch branch has been updated by H.J. Lu
<address@hidden>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7d5f076b451a51d31540350a69e96a02da1033ac

commit 7d5f076b451a51d31540350a69e96a02da1033ac
Author: H.J. Lu <address@hidden>
Date:   Wed Jan 11 09:16:44 2017 -0800

    x86-64: Correct unwind info for the BND PLT and .plt.bnd

    Since the BND PLT has

     230:       68 00 00 00 00          pushq  $0x0
     235:       f2 e9 e5 ff ff ff       bnd jmpq 220 <.plt>
     23b:       0f 1f 44 00 00          nopl   0x0(%rax,%rax,1)

    instead of

     230:       ff 25 e2 0d 20 00       jmpq   *0x200de2(%rip)        # 201018
    <func>
     236:       68 00 00 00 00          pushq  $0x0
     23b:       e9 e0 ff ff ff          jmpq   220 <.plt>

    its unwind info should be

    DW_CFA_def_cfa_expression (DW_OP_breg7 (rsp): 8; DW_OP_breg16 (rip): 0;
    DW_OP_lit15; DW_OP_and; DW_OP_lit5; DW_OP_ge; DW_OP_lit3; DW_OP_shl;
    DW_OP_plus)

    Also generate unwind info for the .plt.bnd section.  Sine it is the same
    as unwind info for the .plt.got section, we use unwind info for the
    .plt.got section to cover the the .plt.bnd section.

    bfd/

    2017-01-13  H.J. Lu  <address@hidden>

        Backport from master
        2017-01-12  H.J. Lu  <address@hidden>

        PR ld/21038
        * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
        plt_bnd_eh_frame.
        (elf_x86_64_check_relocs): Create .eh_frame section for the
        .plt.bnd section.
        (elf_x86_64_size_dynamic_sections): Allocate and initialize
        .eh_frame section for the .plt.bnd section.
        (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
        for the .plt.bnd section.

        2017-01-11  H.J. Lu  <address@hidden>

        PR ld/21038
        * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
        (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
        elf_x86_64_eh_frame_plt_got.
        (elf_x86_64_size_dynamic_sections): Get unwind info from
        elf_x86_64_bnd_arch_bed for the BND PLT.

    ld/

    2017-01-13  H.J. Lu  <address@hidden>

        Backport from master
        2017-01-12  H.J. Lu  <address@hidden>

        PR ld/21038
        * testsuite/ld-x86-64/pr21038b.d: Updated.
        * testsuite/ld-x86-64/pr21038c.d: New file.
        * testsuite/ld-x86-64/pr21038c.s: Likewise.
        * testsuite/ld-x86-64/x86-64.exp: Run pr21038c.

        2017-01-11  H.J. Lu  <address@hidden>

        PR ld/21038
        * testsuite/ld-x86-64/pr21038a.d: New file.
        * testsuite/ld-x86-64/pr21038a.s: Likewise.
        * testsuite/ld-x86-64/pr21038b.d: Likewise.
        * testsuite/ld-x86-64/pr21038b.s: Likewise.
        * testsuite/ld-x86-64/x86-64.exp: Run pr21038a and pr21038b.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]