diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-09-01 06:11:54 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-09-01 06:12:06 -0700 |
commit | e10c9c620c3335731bb0052987affdc40942fd71 (patch) | |
tree | 0e893264f7a0258c4b625d209353dde5a2e9f2c8 /bfd/elf32-i386.c | |
parent | 1c5c938ad860811644774ecea66e044110967cf2 (diff) | |
download | gdb-e10c9c620c3335731bb0052987affdc40942fd71.zip gdb-e10c9c620c3335731bb0052987affdc40942fd71.tar.gz gdb-e10c9c620c3335731bb0052987affdc40942fd71.tar.bz2 |
x86: Correct unwind information for the second PLT
For i386, generate unwind information for the second PLT. For x32,
correct alignment of .eh_frame section for the second PLT.
bfd/
PR ld/22061
* elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
.eh_frame section for the second PLT.
* elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
alignment of .eh_frame section for the second PLT.
ld/
PR ld/22061
* testsuite/ld-i386/ibt-plt-1.d: Updated.
* testsuite/ld-i386/ibt-plt-2a.d: Likewise.
* testsuite/ld-i386/ibt-plt-2c.d: Likewise.
* testsuite/ld-i386/ibt-plt-3a.d: Likewise.
* testsuite/ld-i386/ibt-plt-3c.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-1-x32.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-2a-x32.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-2c-x32.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-3a-x32.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-3c-x32.d: Likewise.
* testsuite/ld-i386/ibt-plt-2b.d: Pass --hash-style=sysv to ld
and dump unwind information.
* testsuite/ld-i386/ibt-plt-2d.d: Likewise.
* testsuite/ld-i386/ibt-plt-3b.d: Likewise.
* testsuite/ld-i386/ibt-plt-3d.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-2b-x32.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-2b.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-2d-x32.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-2d.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-3b-x32.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-3b.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-3d-x32.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-3d.d: Likewise.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r-- | bfd/elf32-i386.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 7b6d21f..a983301 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -6144,6 +6144,20 @@ error_alignment: htab->plt_got_eh_frame = sec; } + + if (htab->plt_second != NULL) + { + sec = bfd_make_section_anyway_with_flags (dynobj, + ".eh_frame", + flags); + if (sec == NULL) + info->callbacks->einfo (_("%F: failed to create the second PLT .eh_frame section\n")); + + if (!bfd_set_section_alignment (dynobj, sec, 2)) + goto error_alignment; + + htab->plt_second_eh_frame = sec; + } } } |