binutils-gdb/ld/testsuite/ld-powerpc/tlsopt5.wf
Alan Modra 1aa4214141 PowerPC64 __tls_get_addr_opt stub .eh_frame fix
This patch sets stub_offset in ppc_size_one_stub rather than in
ppc_build_one_stub.  That allows the plt stub alignment to be done in
just ppc_size_one_stub rather than both functions.  The patch also
corrects the place where the alignment was done, fixing a possible
error in .eh_frame data, and tidies some offset calculations.

bfd/
	* elf64-ppc.c (plt_stub_pad): Delay plt_stub_size call until needed.
	(ppc_build_one_stub): Don't set stub_offset, instead assert that
	it is sane.  Don't adjust stub_offset for alignment.  Adjust size
	calculation.  Use "targ" temp when calculating offsets.
	(ppc_size_one_stub): Set stub_offset here.  Use "targ" temp when
	calculating offsets.  Adjust for alignment before setting
	tls_get_addr_opt_bctrl.
ld/
	* testsuite/ld-powerpc/powerpc.exp: Run tlsopt5 with plt alignment.
	* testsuite/ld-powerpc/tlsopt5.s: Add extra call.
	* testsuite/ld-powerpc/tlsopt5.wf: Adjust expected output.
	* testsuite/ld-powerpc/tlsopt5.d: Likewise.
2018-08-01 12:14:22 +09:30

28 lines
642 B
Plaintext

Contents of the \.eh_frame section:
0+ 0+10 0+ CIE
Version: 1
Augmentation: "zR"
Code alignment factor: 4
Data alignment factor: -8
Return address column: 65
Augmentation data: 1b
DW_CFA_def_cfa: r1 ofs 0
0+14 0+14 0+18 FDE cie=0+ pc=.*
DW_CFA_advance_loc: 80 to .*
DW_CFA_offset_extended_sf: r65 at cfa\+8
DW_CFA_advance_loc: 16 to .*
DW_CFA_restore_extended: r65
0+2c 0+14 0+30 FDE cie=0+ pc=.*
DW_CFA_advance_loc: 4 to .*
DW_CFA_register: r65 in r0
DW_CFA_advance_loc: 28 to .*
DW_CFA_restore_extended: r65
0+44 0+10 0+48 FDE cie=0+ pc=.*
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop