aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-04-27 13:55:31 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-04-27 13:55:48 -0700
commitde9a3c4285fad1914929ee304ddaa26e76af8031 (patch)
treee3368c31ed041c51a8a396d4e758a3f10417ab25 /ld
parentda3d25afa26476bf24247b8696fd00ab31f39db9 (diff)
downloadgdb-de9a3c4285fad1914929ee304ddaa26e76af8031.zip
gdb-de9a3c4285fad1914929ee304ddaa26e76af8031.tar.gz
gdb-de9a3c4285fad1914929ee304ddaa26e76af8031.tar.bz2
x86: Create dynamic sections in create_dynamic_sections
This patch creates dynamic sections in i386/x86-64 create_dynamic_sections instead of creating them on demend. Linker will strip them if they are empty. It changes order in x86-64 .eh_frame section. The extra DW_CFA_nop paddings is due to https://sourceware.org/bugzilla/show_bug.cgi?id=21441 bfd/ * elf32-i386.c (elf_i386_create_dynamic_sections): Create the .plt.got section here. (elf_i386_check_relocs): Don't create the .plt.got section. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create the .plt.got and .plt.bnd sections here. (elf_x86_64_check_relocs): Don't create the .plt.got nor .plt.bnd sections. ld/ * testsuite/ld-x86-64/pr21038a.d: Update DW_CFA_nop paddings in .eh_frame section. * testsuite/ld-x86-64/pr21038c.d: Update .eh_frame order.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog6
-rw-r--r--ld/testsuite/ld-x86-64/pr21038a.d6
-rw-r--r--ld/testsuite/ld-x86-64/pr21038c.d4
3 files changed, 13 insertions, 3 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index c93d903..008e8c9 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ * testsuite/ld-x86-64/pr21038a.d: Update DW_CFA_nop paddings
+ in .eh_frame section.
+ * testsuite/ld-x86-64/pr21038c.d: Update .eh_frame order.
+
2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
* testsuite/ld-i386/tlsdesc2.d: New test.
diff --git a/ld/testsuite/ld-x86-64/pr21038a.d b/ld/testsuite/ld-x86-64/pr21038a.d
index e6829d5..f2f88eb 100644
--- a/ld/testsuite/ld-x86-64/pr21038a.d
+++ b/ld/testsuite/ld-x86-64/pr21038a.d
@@ -40,7 +40,11 @@ Contents of the .eh_frame section:
DW_CFA_nop
DW_CFA_nop
-0+58 0000000000000010 0000005c FDE cie=00000000 pc=0000000000000230..0000000000000238
+0+58 0000000000000014 0000005c FDE cie=00000000 pc=0000000000000230..0000000000000238
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
diff --git a/ld/testsuite/ld-x86-64/pr21038c.d b/ld/testsuite/ld-x86-64/pr21038c.d
index 5b6c22f..05b3622 100644
--- a/ld/testsuite/ld-x86-64/pr21038c.d
+++ b/ld/testsuite/ld-x86-64/pr21038c.d
@@ -40,7 +40,7 @@ Contents of the .eh_frame section:
DW_CFA_nop
DW_CFA_nop
-0+58 0000000000000014 0000005c FDE cie=00000000 pc=0000000000000288..0000000000000290
+0+58 0000000000000014 0000005c FDE cie=00000000 pc=0000000000000280..0000000000000288
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
@@ -49,7 +49,7 @@ Contents of the .eh_frame section:
DW_CFA_nop
DW_CFA_nop
-0+70 0000000000000010 00000074 FDE cie=00000000 pc=0000000000000280..0000000000000288
+0+70 0000000000000010 00000074 FDE cie=00000000 pc=0000000000000288..0000000000000290
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop