From bbf96e4eef9eddce8e421bf9a004e7916c5ef95d Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 25 May 2012 16:20:15 +0000 Subject: [PATCH] Don't use dynamic_sec_flags on PLT .eh_frame section * elf32-i386.c (elf_i386_create_dynamic_sections): Don't use dynamic_sec_flags to create PLT .eh_frame section. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. --- bfd/ChangeLog | 6 ++++++ bfd/elf32-i386.c | 9 ++++----- bfd/elf64-x86-64.c | 9 ++++----- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 2165cd8c160..9834aab85c4 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2012-05-25 H.J. Lu + + * elf32-i386.c (elf_i386_create_dynamic_sections): Don't use + dynamic_sec_flags to create PLT .eh_frame section. + * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. + 2012-05-25 Alan Modra PR ld/13909 diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 7b33d77cc54..6aa386d1752 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -1018,12 +1018,11 @@ elf_i386_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) && htab->plt_eh_frame == NULL && htab->elf.splt != NULL) { - flagword flags = get_elf_backend_data (dynobj)->dynamic_sec_flags; + flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY + | SEC_HAS_CONTENTS | SEC_IN_MEMORY + | SEC_LINKER_CREATED); htab->plt_eh_frame - = bfd_make_section_anyway_with_flags (dynobj, ".eh_frame", - (flags - | SEC_LINKER_CREATED - | SEC_READONLY)); + = bfd_make_section_anyway_with_flags (dynobj, ".eh_frame", flags); if (htab->plt_eh_frame == NULL || !bfd_set_section_alignment (dynobj, htab->plt_eh_frame, 2)) return FALSE; diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index abd8d60f51f..5614aa24fa6 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -982,12 +982,11 @@ elf_x86_64_create_dynamic_sections (bfd *dynobj, && htab->plt_eh_frame == NULL && htab->elf.splt != NULL) { - flagword flags = get_elf_backend_data (dynobj)->dynamic_sec_flags; + flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY + | SEC_HAS_CONTENTS | SEC_IN_MEMORY + | SEC_LINKER_CREATED); htab->plt_eh_frame - = bfd_make_section_anyway_with_flags (dynobj, ".eh_frame", - (flags - | SEC_LINKER_CREATED - | SEC_READONLY)); + = bfd_make_section_anyway_with_flags (dynobj, ".eh_frame", flags); if (htab->plt_eh_frame == NULL || !bfd_set_section_alignment (dynobj, htab->plt_eh_frame, 3)) return FALSE; -- 2.30.2