diff options
author | Alan Modra <amodra@gmail.com> | 2017-08-31 19:39:14 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-08-31 19:40:35 +0930 |
commit | 9866ffe25a0fe73f5153f2720650baf0dd9cc828 (patch) | |
tree | a376674444cbc25e4486a62c09be7f9151cff19d /ld | |
parent | 654670a4f0928e3eddc6395d6804deb2e61a0614 (diff) | |
download | gdb-9866ffe25a0fe73f5153f2720650baf0dd9cc828.zip gdb-9866ffe25a0fe73f5153f2720650baf0dd9cc828.tar.gz gdb-9866ffe25a0fe73f5153f2720650baf0dd9cc828.tar.bz2 |
Remove .eh_frame zero terminators
The machinery to do this was there, but not enabled if the terminator
was the only thing in the section.
bfd/
* elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
for a section containing just a terminator. Allow multiple
terminators at end of section.
* elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
sections when not adding alignment. Assert on terminator in
the middle of FDEs.
ld/
* testsuite/ld-elf/eh3.d: Update.
* testsuite/ld-elf/eh4.d: Update.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/eh3.d | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/eh4.d | 4 |
3 files changed, 8 insertions, 13 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 1dcb981..670f356 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2017-08-31 Alan Modra <amodra@gmail.com> + + * testsuite/ld-elf/eh3.d: Update. + * testsuite/ld-elf/eh4.d: Update. + 2017-08-30 Maciej W. Rozycki <macro@imgtec.com> * testsuite/ld-elf/orphan-11.ld: Also discard `.MIPS.options' 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 |