summaryrefslogtreecommitdiff
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-05-22 14:05:13 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-05-22 14:05:13 +0000
commitf96dfd8483ef8f7c85d2947ff19d2ed56ba5c243 (patch)
tree5f2fba3ddfe501a89ef5fcb9c457b7785d0986ed /bfd/elf32-i386.c
parent5f031c564ce24a6f68614802fee6e742d653a46e (diff)
downloadbinutils-redhat-f96dfd8483ef8f7c85d2947ff19d2ed56ba5c243.tar.gz
Always create PLT eh_frame section for i386/x86-64
bfd/ 2012-05-22 H.J. Lu <hongjiu.lu@intel.com> PR ld/14105 * elf32-i386.c (elf_i386_create_dynamic_sections): Always create PLT eh_frame section with SEC_LINKER_CREATED. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. ld/testsuite/ 2012-05-20 H.J. Lu <hongjiu.lu@intel.com> PR ld/14105 * ld-elf/eh4.d: Add PLT eh_frame. * ld-i386/i386.exp: Run pr12570a and pr12570b. * ld-x86-64/x86-64.exp: Likewise. * ld-i386/pr12570a.d: New file. * ld-i386/pr12570a.s: Likewise. * ld-i386/pr12570b.s: Likewise. * ld-i386/pr12570b.s: Likewise. * ld-x86-64/pr12570a.d: Likewise. * ld-x86-64/pr12570a.s: Likewise. * ld-x86-64/pr12570b.d: Likewise. * ld-x86-64/pr12570b.s: Likewise.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r--bfd/elf32-i386.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index dd49486533..84299ceb9e 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1015,13 +1015,15 @@ elf_i386_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
return FALSE;
if (!info->no_ld_generated_unwind_info
- && bfd_get_section_by_name (dynobj, ".eh_frame") == NULL
+ && htab->plt_eh_frame == NULL
&& htab->elf.splt != NULL)
{
flagword flags = get_elf_backend_data (dynobj)->dynamic_sec_flags;
htab->plt_eh_frame
- = bfd_make_section_with_flags (dynobj, ".eh_frame",
- flags | SEC_READONLY);
+ = bfd_make_section_anyway_with_flags (dynobj, ".eh_frame",
+ (flags
+ | SEC_LINKER_CREATED
+ | SEC_READONLY));
if (htab->plt_eh_frame == NULL
|| !bfd_set_section_alignment (dynobj, htab->plt_eh_frame, 2))
return FALSE;