binutils-gdb/ld/testsuite/ld-elf/eh4.d
Jakub Jelinek ac685e6adf * elf-bfd.h (struct eh_cie_fde): Add set_loc pointer.
* elf-eh-frame.c (skip_cfa_op): Fix handling of DW_CFA_advance_loc.
	Handle DW_CFA_{remember,restore}_state, DW_CFA_GNU_window_save,
	DW_CFA_val_{offset{,_sf},expression}.
	(skip_non_nops): Record number of DW_CFA_set_loc ops.
	(_bfd_elf_discard_section_eh_frame): Require skip_non_nops recognizes
	all ops.  If there are any DW_CFA_set_loc ops and they are pcrel
	or going to be pcrel, compute set_loc array.
	(_bfd_elf_eh_frame_section_offset): If make_relative, kill relocations
	against DW_CFA_set_loc operands.
	(_bfd_elf_write_section_eh_frame): Handle DW_CFA_set_loc adjusting.

	* ld-elf/eh4.d: New test.
	* ld-elf/eh4.s: New file.
	* ld-elf/eh4a.s: New file.
2006-10-03 13:15:39 +00:00

33 lines
672 B
Makefile

#source: eh4.s
#source: eh4a.s
#ld: -shared
#readelf: -wf
#target: x86_64-*-*
The section .eh_frame contains:
00000000 00000014 00000000 CIE
Version: 1
Augmentation: "zR"
Code alignment factor: 1
Data alignment factor: -8
Return address column: 16
Augmentation data: 1b
DW_CFA_def_cfa: r7 ofs 8
DW_CFA_offset: r16 at cfa-8
DW_CFA_nop
DW_CFA_nop
00000018 00000014 0000001c FDE cie=00000000 pc=00000400..00000413
DW_CFA_set_loc: 00000404
DW_CFA_def_cfa_offset: 80
00000030 00000014 00000034 FDE cie=00000000 pc=00000413..00000426
DW_CFA_set_loc: 00000417
DW_CFA_def_cfa_offset: 80
00000048 ZERO terminator
#pass