aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-05-22 14:46:44 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-05-22 14:46:44 +0000
commit5d4f7eb2f0a24d5211810fba26603962af5b2e5a (patch)
treebc9cf26a1620d223d770ce4e1f7223c73695e273 /bfd
parent2fe0fd0638dafee893dcb791036a49e5a6988954 (diff)
downloadgdb-5d4f7eb2f0a24d5211810fba26603962af5b2e5a.zip
gdb-5d4f7eb2f0a24d5211810fba26603962af5b2e5a.tar.gz
gdb-5d4f7eb2f0a24d5211810fba26603962af5b2e5a.tar.bz2
Create PLT eh_frame section if there is .eh_frame section
bfd/ PR ld/13909 * elf32-i386.c (elf_i386_create_dynamic_sections): Create PLT eh_frame section if there is an input .eh_frame section. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. ld/testsuite/ PR ld/13909 * ld-i386/i386.exp: Run pr13909. * ld-x86-64/x86-64.exp: Likewise. * ld-i386/dummy.s: New file. * ld-i386/pr13909.d: Likewise. * ld-x86-64/pr13909.d: Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elf32-i386.c3
-rw-r--r--bfd/elf64-x86-64.c3
3 files changed, 11 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index cfdcaa3..6271710 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,12 @@
2012-05-22 H.J. Lu <hongjiu.lu@intel.com>
+ PR ld/13909
+ * elf32-i386.c (elf_i386_create_dynamic_sections): Create PLT
+ eh_frame section if there is an input .eh_frame section.
+ * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
+
+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.
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 84299ce..e0d7fff 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1016,7 +1016,8 @@ elf_i386_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
if (!info->no_ld_generated_unwind_info
&& htab->plt_eh_frame == NULL
- && htab->elf.splt != NULL)
+ && htab->elf.splt != NULL
+ && bfd_get_section_by_name (dynobj, ".eh_frame") != NULL)
{
flagword flags = get_elf_backend_data (dynobj)->dynamic_sec_flags;
htab->plt_eh_frame
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 1f490d4..27354df 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -980,7 +980,8 @@ elf_x86_64_create_dynamic_sections (bfd *dynobj,
if (!info->no_ld_generated_unwind_info
&& htab->plt_eh_frame == NULL
- && htab->elf.splt != NULL)
+ && htab->elf.splt != NULL
+ && bfd_get_section_by_name (dynobj, ".eh_frame") != NULL)
{
const struct elf_x86_64_backend_data *const abed
= get_elf_x86_64_backend_data (dynobj);