[binutils-gdb] aarch64: adapt bti-plt-so to use selectable GNU properties

Matthieu Longo mlongo@sourceware.org
Mon Dec 2 15:20:50 GMT 2024


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=db61887f969b4947f32d616225491bc1d7758a8f

commit db61887f969b4947f32d616225491bc1d7758a8f
Author: Matthieu Longo <matthieu.longo@arm.com>
Date:   Fri Nov 29 15:27:04 2024 +0000

    aarch64: adapt bti-plt-so to use selectable GNU properties

Diff:
---
 .../ld-aarch64/protections/aarch64-protections.exp      |  2 +-
 ld/testsuite/ld-aarch64/protections/bti-plt-so.s        | 17 ++---------------
 2 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/ld/testsuite/ld-aarch64/protections/aarch64-protections.exp b/ld/testsuite/ld-aarch64/protections/aarch64-protections.exp
index 233384da523..471afa13a63 100644
--- a/ld/testsuite/ld-aarch64/protections/aarch64-protections.exp
+++ b/ld/testsuite/ld-aarch64/protections/aarch64-protections.exp
@@ -40,7 +40,7 @@ foreach test_lp64 $test_lp64_list {
 set aarch64elflinktests {
   {"Build bti-plt-so for PLT tests"
    "-shared" ""
-   ""
+   "-I$srcdir/$subdir -defsym __property_bti__=1"
    {bti-plt-so.s} {} "libbti-plt-so.so"}
 }
 
diff --git a/ld/testsuite/ld-aarch64/protections/bti-plt-so.s b/ld/testsuite/ld-aarch64/protections/bti-plt-so.s
index 2c11356dba8..45d827023f4 100644
--- a/ld/testsuite/ld-aarch64/protections/bti-plt-so.s
+++ b/ld/testsuite/ld-aarch64/protections/bti-plt-so.s
@@ -24,18 +24,5 @@ bar:
 	add	sp, sp, 16
 	ret
 	.size	bar, .-bar
-	.section ".note.gnu.property", "a"
-	.p2align 3
-	.long 1f - 0f		/* name length */
-	.long 5f - 2f		/* data length */
-	.long 5			/* note type */
-0:	.asciz "GNU"		/* vendor name */
-1:
-	.p2align 3
-2:	.long 0xc0000000	/* pr_type.  */
-	.long 4f - 3f		/* pr_datasz.  */
-3:
-	.long 0x1		/* BTI.  */
-4:
-	.p2align 3
-5:
+
+.include "gnu-note-properties-selectable-merged.inc"


More information about the Binutils-cvs mailing list