c2aaac080c
These are useless because they can't match any address. In fact, worse than useless because the .eh_frame_hdr lookup table matching addresses to FDEs does not contain information about the FDE range. The table is sorted by address; Range is inferred by the address delta from one entry to the next. So if a zero address range FDE is followed by a normal non-zero range FDE for the same address, everything is good. However, the qsort could just as easily sort the FDEs in the other order, in which case the normal FDE would effectively be seen to have a zero range. bfd/ PR 17447 * elf-bfd.h (struct eh_cie_fde): Comment re NULL u.fde.cie_inf. * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Mark zero address range FDEs for discarding. (vma_compare): Sort on range after address. (_bfd_elf_gc_mark_fdes): Test for NULL u.fde.cie_inf. (_bfd_elf_discard_section_eh_frame): Likewise. Write "FDE" in error message rather than "fde". (_bfd_elf_write_section_eh_frame_hdr): Write "PC" and "FDE" in error message. ld/testsuite/ * ld-elf/eh1.s: Don't create FDEs with zero address ranges. * ld-elf/eh3.s: Likewise. * ld-elf/eh1.d, * ld-elf/eh2.d, * ld-elf/eh3.d: Adjust. * ld-mips-elf/eh-frame1-n32.d: Warning match update. * ld-mips-elf/eh-frame1-n64.d: Likewise. * ld-mips-elf/eh-frame2-n32.d: Likewise. * ld-mips-elf/eh-frame2-n64.d: Likewise.
35 lines
728 B
Makefile
35 lines
728 B
Makefile
#source: eh3.s
|
|
#source: eh3a.s
|
|
#as: --64
|
|
#ld: -melf_x86_64 -Ttext 0x400078
|
|
#readelf: -wf
|
|
#target: x86_64-*-*
|
|
|
|
Contents of the .eh_frame section:
|
|
|
|
0+0000 0+0014 0+0000 CIE
|
|
Version: 1
|
|
Augmentation: ""
|
|
Code alignment factor: 1
|
|
Data alignment factor: -8
|
|
Return address column: 16
|
|
|
|
DW_CFA_def_cfa: r7 \(rsp\) ofs 8
|
|
DW_CFA_offset: r16 \(rip\) at cfa-8
|
|
DW_CFA_nop
|
|
DW_CFA_nop
|
|
DW_CFA_nop
|
|
DW_CFA_nop
|
|
DW_CFA_nop
|
|
DW_CFA_nop
|
|
|
|
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\)
|
|
|
|
0+0038 ZERO terminator
|
|
#pass
|