From de9a3c4285fad1914929ee304ddaa26e76af8031 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 27 Apr 2017 13:55:31 -0700 Subject: 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. --- ld/ChangeLog | 6 ++++++ ld/testsuite/ld-x86-64/pr21038a.d | 6 +++++- ld/testsuite/ld-x86-64/pr21038c.d | 4 ++-- 3 files changed, 13 insertions(+), 3 deletions(-) (limited to 'ld') 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 + + * 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 * 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 -- cgit v1.1