aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog7
-rw-r--r--ld/testsuite/ld-aarch64/aarch64-elf.exp2
-rw-r--r--ld/testsuite/ld-aarch64/property-bti-pac4-a.d11
-rw-r--r--ld/testsuite/ld-aarch64/property-bti-pac4-b.d11
-rw-r--r--ld/testsuite/ld-aarch64/property-bti-pac4.s21
5 files changed, 52 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 4d747af..acbbf94 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,12 @@
2019-06-06 Sudakshina Das <sudi.das@arm.com>
+ * testsuite/ld-aarch64/aarch64-elf.exp: Add new tests.
+ * testsuite/ld-aarch64/property-bti-pac4-a.d: New test.
+ * testsuite/ld-aarch64/property-bti-pac4-b.d: New test.
+ * testsuite/ld-aarch64/property-bti-pac4.s: New test.
+
+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.
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp
index c1a9495..d0a588c 100644
--- a/ld/testsuite/ld-aarch64/aarch64-elf.exp
+++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp
@@ -381,6 +381,8 @@ run_dump_test_lp64 "pie-bind-locally"
run_dump_test "property-bti-pac1"
run_dump_test "property-bti-pac2"
run_dump_test "property-bti-pac3"
+run_dump_test "property-bti-pac4-a"
+run_dump_test "property-bti-pac4-b"
run_dump_test "bti-plt-1"
run_dump_test "bti-plt-2"
diff --git a/ld/testsuite/ld-aarch64/property-bti-pac4-a.d b/ld/testsuite/ld-aarch64/property-bti-pac4-a.d
new file mode 100644
index 0000000..d9aa5cf
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/property-bti-pac4-a.d
@@ -0,0 +1,11 @@
+#name: PT_GNU_PROPERTY alignment
+#source: property-bti-pac4.s
+#as: -mabi=lp64
+#ld: -z force-bti -e main
+#readelf: -l --wide
+#target: *linux*
+#warning: .*property-bti-pac4.*: warning: BTI turned on by -z force-bti.*
+
+#...
+ GNU_PROPERTY .* +0x8
+#...
diff --git a/ld/testsuite/ld-aarch64/property-bti-pac4-b.d b/ld/testsuite/ld-aarch64/property-bti-pac4-b.d
new file mode 100644
index 0000000..02f9fc5
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/property-bti-pac4-b.d
@@ -0,0 +1,11 @@
+#name: PT_GNU_PROPERTY alignment ILP32
+#source: property-bti-pac4.s
+#as: -mabi=ilp32
+#ld: -m [aarch64_choose_ilp32_emul] -z force-bti -e main
+#readelf: -l --wide
+#target: *linux*
+#warning: .*property-bti-pac4.*: warning: BTI turned on by -z force-bti.*
+
+#...
+ GNU_PROPERTY .* +0x4
+#...
diff --git a/ld/testsuite/ld-aarch64/property-bti-pac4.s b/ld/testsuite/ld-aarch64/property-bti-pac4.s
new file mode 100644
index 0000000..a1122ff
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/property-bti-pac4.s
@@ -0,0 +1,21 @@
+ .arch armv8-a
+ .file "t.c"
+ .text
+ .align 2
+ .p2align 3,,7
+ .global f
+ .type f, %function
+f:
+ add w0, w0, 1
+ ret
+ .size f, .-f
+ .section .text.startup,"ax",@progbits
+ .align 2
+ .p2align 3,,7
+ .global main
+ .type main, %function
+main:
+ mov w0, 6
+ ret
+ .size main, .-main
+ .section .note.GNU-stack,"",@progbits