binutils-gdb/ld/testsuite/ld-aarch64/farcall-b-plt.d
Jim Wilson 9a2ebffd4d Ensure 8-byte alignment for AArch64 stubs.
PR 22903
bfd	* elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
	and nop instead of 4.
	(elfNN_arch64_build_stubs): Add nop after branch.  Increase size by
	8 instead of 4.

ld	* emultempl/aarch64elf.em (elf${ELFSIZE}_aarch64_add_stub_section):
	Give stub_sec 8 byte alignment.
	* emulparams/aarch64cloudabi.sh (NOP): Set to 0x1f2003d5.
	* emulparams/aarch64elf.sh (NOP): Likewise.
	* emulparams/aarch64elf32.sh (NOP): Likewise.
	* emulparams/aarch64fbsd.sh (NOP): Likewise.
	* emulparams/aarch64linux.sh (NOP): Likewise.
	* emulparams/aarch64linux32.sh (NOP): Likewise.
	* testsuite/ld-aarch64/erratum835769.d: Adjust for added nop.
	* testsuite/ld-aarch64/erratum843419.d: Likewise.
	* testsuite/ld-aarch64/farcall-b-defsym.d: Likewise.
	* testsuite/ld-aarch64/farcall-b-none-function.d: Likewise.
	* testsuite/ld-aarch64/farcall-b-plt.d: Likewise.
	* testsuite/ld-aarch64/farcall-b-section.d: Likewise.
	* testsuite/ld-aarch64/farcall-b.d: Likewise.
	* testsuite/ld-aarch64/farcall-back.d: Likewise.
	* testsuite/ld-aarch64/farcall-bl-defsym.d: Likewise.
	* testsuite/ld-aarch64/farcall-bl-none-function.d: Likewise.
	* testsuite/ld-aarch64/farcall-bl-plt.d: Likewise.
	* testsuite/ld-aarch64/farcall-bl-section.d: Likewise.
	* testsuite/ld-aarch64/farcall-bl.d: Likewise.
2018-03-02 10:49:20 +00:00

41 lines
745 B
Makefile

#name: aarch64-farcall-b-plt
#source: farcall-b-plt.s
#as:
#ld: -shared
#objdump: -dr
#...
Disassembly of section .plt:
.* <.plt>:
.*: a9bf7bf0 stp x16, x30, \[sp, #-16\]!
.*: .* adrp x16, .* <__foo_veneer\+.*>
.*: .* ldr [wx]17, \[x16, #.*\]
.*: .* add [wx]16, [wx]16, #.*
.*: d61f0220 br x17
.*: d503201f nop
.*: d503201f nop
.*: d503201f nop
.* <foo@plt>:
.*: .* adrp x16, .* <__foo_veneer\+.*>
.*: .* ldr [wx]17, \[x16, #.*\]
.*: .* add [wx]16, [wx]16, #.*
.*: d61f0220 br x17
Disassembly of section .text:
.* <_start>:
...
.*: .* b .* <__foo_veneer>
.*: d65f03c0 ret
.*: .* nop
.*: .* b .* <__foo_veneer\+.*>
.*: .* nop
.* <__foo_veneer>:
.*: .* adrp x16, 0 <.*>
.*: .* add x16, x16, #.*
.*: d61f0200 br x16
...