binutils-gdb/ld/testsuite/ld-aarch64/bti-plt-3.d
Sudakshina Das 8bf6d176b0 [LD, AArch64] Move ELF options behind -z
This patch moves the current AArch64 ld options of --force-bti
and --pac-plt to -z force-bti and -z pac-plt since these are
ELF specific options.

*** bfd/ChangeLog ***

2019-06-06  Sudakshina Das  <sudi.das@arm.com>

	* bfd-in.h: Change comment.
	* bfd-in2.h: Regenerate.
	* elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
	* elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
	Likwise.

*** ld/ChangeLog ***

2019-06-06  Sudakshina Das  <sudi.das@arm.com>

	* NEWS: Update options names.
	* emultempl/aarch64elf.em (OPTION_FORCE_BTI, OPTION_PAC_PLT): Remove.
	(PARSE_AND_LIST_LONGOPTS): Remove force-bti and pac-plt.
	(PARSE_AND_LIST_OPTIONS): Update to -z.
	(PARSE_AND_LIST_ARGS_CASE_Z_AARCH64): New.
	(PARSE_AND_LIST_ARGS_CASE_Z): Add PARSE_AND_LIST_ARGS_CASE_Z_AARCH64.
	(PARSE_AND_LIST_ARGS_CASES): Move cases for these options.
	* testsuite/ld-aarch64/bti-pac-plt-1.d: Update option.
	* testsuite/ld-aarch64/bti-pac-plt-2.d: Likewise.
	* testsuite/ld-aarch64/bti-plt-1.d: Likewise.
	* testsuite/ld-aarch64/bti-plt-2.d: Likewise.
	* testsuite/ld-aarch64/bti-plt-3.d: Likewise.
	* testsuite/ld-aarch64/bti-plt-4.d: Likewise.
	* testsuite/ld-aarch64/bti-plt-6.d: Likewise.
	* testsuite/ld-aarch64/bti-plt-7.d: Likewise.
	* testsuite/ld-aarch64/bti-warn.d: Likewise.
	* testsuite/ld-aarch64/pac-plt-1.d: Likewise.
	* testsuite/ld-aarch64/pac-plt-2.d: Likewise.
2019-06-06 12:21:14 +01:00

36 lines
891 B
Makefile

#name: Check -z force-bti emits BTI PLT (exec)
#source: bti-plt-1.s
#as: -mabi=lp64
#ld: -z force-bti -e _start -T bti-plt.ld -L./tmpdir -lbti-plt-so
#objdump: -dr -j .plt
[^:]*: *file format elf64-.*aarch64
Disassembly of section \.plt:
[0-9]+ <.*>:
.*: d503245f bti c
.*: a9bf7bf0 stp x16, x30, \[sp, #-16\]!
.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
.*: f9400e11 ldr x17, \[x16, #24\]
.*: 91006210 add x16, x16, #0x18
.*: d61f0220 br x17
.*: d503201f nop
.*: d503201f nop
[0-9]+ <.*>:
.*: d503245f bti c
.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
.*: f9401211 ldr x17, \[x16, #32\]
.*: 91008210 add x16, x16, #0x20
.*: d61f0220 br x17
.*: d503201f nop
[0-9]+ <.*>:
.*: d503245f bti c
.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
.*: f9401611 ldr x17, \[x16, #40\]
.*: 9100a210 add x16, x16, #0x28
.*: d61f0220 br x17
.*: d503201f nop