diff options
author | Nick Clifton <nickc@redhat.com> | 2017-09-04 17:28:17 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2017-09-04 17:28:17 +0100 |
commit | 35e01275b59ac867d342379d457e732b5acda6a3 (patch) | |
tree | a7727589f5dfa8302504411989ece29c9f738f1a /ld | |
parent | d6f8dea6798528de0fc762409595251eeeb1f547 (diff) | |
download | gdb-35e01275b59ac867d342379d457e732b5acda6a3.zip gdb-35e01275b59ac867d342379d457e732b5acda6a3.tar.gz gdb-35e01275b59ac867d342379d457e732b5acda6a3.tar.bz2 |
Import patch from mainline to improve padding of .eh_frame sections.
PR 21441
bfd * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
alignment padding here.
* elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
in a reverse pass over sections.
ld * testsuite/ld-elf/eh3.d: Update.
* testsuite/ld-elf/eh4.d: Update.
PR 21441
* testsuite/ld-x86-64/pr21038a.d: Adjust.
* testsuite/ld-x86-64/pr21038a-now.d: Adjust.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/eh3.d | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/eh4.d | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pr21038a-now.d | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pr21038a.d | 8 |
5 files changed, 18 insertions, 25 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 24d0ed2..e8ee459 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,14 @@ +2017-09-04 Nick Clifton <nickc@redhat.com> + + Import from mainline: + + * testsuite/ld-elf/eh3.d: Update. + * testsuite/ld-elf/eh4.d: Update. + + PR 21441 + * testsuite/ld-x86-64/pr21038a.d: Adjust. + * testsuite/ld-x86-64/pr21038a-now.d: Adjust. + 2017-09-01 H.J. Lu <hongjiu.lu@intel.com> PR ld/22064 diff --git a/ld/testsuite/ld-elf/eh3.d b/ld/testsuite/ld-elf/eh3.d index 3811341..6ac584a 100644 --- a/ld/testsuite/ld-elf/eh3.d +++ b/ld/testsuite/ld-elf/eh3.d @@ -23,20 +23,12 @@ Contents of the .eh_frame section: DW_CFA_nop DW_CFA_nop -0+0018 0+0024 0+001c FDE cie=0+0000 pc=0+400078\.\.0+400090 +0+0018 0+001c 0+001c FDE cie=0+0000 pc=0+400078\.\.0+400090 DW_CFA_advance_loc: 8 to 0+400080 DW_CFA_def_cfa_offset: 16 DW_CFA_offset: r6 \(rbp\) at cfa-16 DW_CFA_advance_loc: 8 to 0+400088 DW_CFA_def_cfa_register: r6 \(rbp\) - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop -0+0040 ZERO terminator +0+0038 ZERO terminator #pass diff --git a/ld/testsuite/ld-elf/eh4.d b/ld/testsuite/ld-elf/eh4.d index b5eec2f..6c1cb32 100644 --- a/ld/testsuite/ld-elf/eh4.d +++ b/ld/testsuite/ld-elf/eh4.d @@ -28,14 +28,12 @@ Contents of the .eh_frame section: DW_CFA_set_loc: 0+0417 DW_CFA_def_cfa_offset: 80 -0+0048 0+0024 0+004c FDE cie=0+0000 pc=[0-9a-f]+\.\.[0-9a-f]+ +0+0048 0+002[04] 0+004c FDE cie=0+0000 pc=[0-9a-f]+\.\.[0-9a-f]+ DW_CFA_def_cfa_offset: 16 DW_CFA_advance_loc: [0-9a-f]+ to [0-9a-f]+ DW_CFA_def_cfa_offset: 24 DW_CFA_advance_loc: [0-9a-f]+ to [0-9a-f]+ DW_CFA_def_cfa_expression \(DW_OP_breg7 \(rsp\): 8; DW_OP_breg16 \(rip\): 0;.* - DW_CFA_nop #... - [0-9a-f]+ ZERO terminator #pass diff --git a/ld/testsuite/ld-x86-64/pr21038a-now.d b/ld/testsuite/ld-x86-64/pr21038a-now.d index ebc5128..1d5bec1 100644 --- a/ld/testsuite/ld-x86-64/pr21038a-now.d +++ b/ld/testsuite/ld-x86-64/pr21038a-now.d @@ -1,7 +1,7 @@ #name: PR ld/21038 (.plt.got, -z now) #source: pr21038a.s #as: --64 -#ld: -z now -z bndplt -melf_x86_64 -shared -z relro --ld-generated-unwind-info +#ld: -z now -z bndplt -melf_x86_64 -shared -z relro --ld-generated-unwind-info --hash-style=sysv #objdump: -dw -Wf .*: +file format .* @@ -41,11 +41,7 @@ Contents of the .eh_frame section: DW_CFA_nop DW_CFA_nop -0+58 0000000000000014 0000005c FDE cie=00000000 pc=0000000000000230..0000000000000238 - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop +0+58 0000000000000010 0000005c FDE cie=00000000 pc=0000000000000230..0000000000000238 DW_CFA_nop DW_CFA_nop DW_CFA_nop diff --git a/ld/testsuite/ld-x86-64/pr21038a.d b/ld/testsuite/ld-x86-64/pr21038a.d index 81b26cb..01770ec 100644 --- a/ld/testsuite/ld-x86-64/pr21038a.d +++ b/ld/testsuite/ld-x86-64/pr21038a.d @@ -1,6 +1,6 @@ #name: PR ld/21038 (.plt.got) #as: --64 -#ld: -z bndplt -melf_x86_64 -shared -z relro --ld-generated-unwind-info +#ld: -z bndplt -melf_x86_64 -shared -z relro --ld-generated-unwind-info --hash-style=sysv #objdump: -dw -Wf .*: +file format .* @@ -40,11 +40,7 @@ Contents of the .eh_frame section: DW_CFA_nop DW_CFA_nop -0+58 0000000000000014 0000005c FDE cie=00000000 pc=0000000000000230..0000000000000238 - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop +0+58 0000000000000010 0000005c FDE cie=00000000 pc=0000000000000230..0000000000000238 DW_CFA_nop DW_CFA_nop DW_CFA_nop |