]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Re: elf: Add GNU_PROPERTY_MEMORY_SEAL gnu property
authorAlan Modra <amodra@gmail.com>
Wed, 15 Jan 2025 03:57:11 +0000 (14:27 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 15 Jan 2025 05:18:50 +0000 (15:48 +1030)
Don't run tests on targets without required support.  Supply an
explicit -z nomemory-seal rather then relying on the harness default,
to lessen confusion for people looking at the test.  Don't use numeric
labels for the sake of hppa64*-hpux, and run the tests there.  Remove
incorrect comment about source editing.  Also, xfail rather than
notarget failing tests with a list of target triples so we check that
the list is correct.

ld/testsuite/ld-elf/property-seal-1.d
ld/testsuite/ld-elf/property-seal-1.s
ld/testsuite/ld-elf/property-seal-2.d
ld/testsuite/ld-elf/property-seal-3.d
ld/testsuite/ld-elf/property-seal-4.d
ld/testsuite/ld-elf/property-seal-5.d
ld/testsuite/ld-elf/property-seal-6.d
ld/testsuite/ld-elf/property-seal-7.d
ld/testsuite/ld-elf/property-seal-8.d

index a0b1feedf3183359dce344eae2184313f926f979..486025a1fb115b7fb764eb40bd227b5857f64ce2 100644 (file)
@@ -2,12 +2,11 @@
 # ET_DYN.
 #source: property-seal-1.s
 #as: --generate-missing-build-notes=no
-#ld: -shared
+#ld: -shared -z nomemory-seal
 #readelf: -n
-#xfail: ![check_shared_lib_support]
-#notarget: am33_2.0-*-* hppa*-*-hpux* mn10300-*-*
-# Assembly source file for the HPPA assembler is renamed and modifed by
-# sed.  mn10300 has relocations in .note.gnu.property section which
+#notarget: ![check_shared_lib_support] ![check_memory_seal_support]
+#xfail: am33_2.0-*-* mn10300-*-*
+# mn10300 has relocations in .note.gnu.property section which
 # elf_parse_notes doesn't support.
 
 #failif
index aa28a3d0516f507bafeb1b1bf35530f6690913d8..d04a70c9c1cce3286f7805afe497b1ef3ad65d81 100644 (file)
@@ -1,11 +1,11 @@
        .section ".note.gnu.property", "a"
        .p2align ALIGN
-       .long 1f - 0f           /* name length */
-       .long 3f - 2f           /* data length */
+       .long .L1 - .L0         /* name length */
+       .long .L3 - .L2         /* data length */
        .long 5                 /* note type */
-0:     .asciz "GNU"            /* vendor name */
-1:
+.L0:   .asciz "GNU"            /* vendor name */
+.L1:
        .p2align ALIGN
-2:     .long 3                 /* pr_type.  */
+.L2:   .long 3                 /* pr_type.  */
        .long 0                 /* pr_datasz.  */
-3:
+.L3:
index ebdaa623e0cd42df6b7c872989119c21962cab6d..dadb9e50bea1f9086b0b7d0083f1cfd10c27f56c 100644 (file)
@@ -3,12 +3,11 @@
 #source: empty.s
 #source: property-seal-1.s
 #as: --generate-missing-build-notes=no
-#ld: -shared
+#ld: -shared -z nomemory-seal
 #readelf: -n
-#xfail: ![check_shared_lib_support]
-#notarget: am33_2.0-*-* hppa*-*-hpux* mn10300-*-*
-# Assembly source file for the HPPA assembler is renamed and modifed by
-# sed.  mn10300 has relocations in .note.gnu.property section which
+#notarget: ![check_shared_lib_support] ![check_memory_seal_support]
+#xfail: am33_2.0-*-* mn10300-*-*
+# mn10300 has relocations in .note.gnu.property section which
 # elf_parse_notes doesn't support.
 
 #failif
index 969729ee0f4d89632624598f6b36eaf7df1942f2..38a41a05b59dc7b32859e4216cfb0f08433bf878 100644 (file)
@@ -2,12 +2,12 @@
 # ET_EXEC.
 #source: property-seal-1.s
 #as: --generate-missing-build-notes=no
-#ld: -e _start
+#ld: -e _start -z nomemory-seal
 #warning: .*: warning: cannot find entry symbol .*
 #readelf: -n
-#notarget: am33_2.0-*-* hppa*-*-hpux* mn10300-*-*
-# Assembly source file for the HPPA assembler is renamed and modifed by
-# sed.  mn10300 has relocations in .note.gnu.property section which
+#notarget: ![check_memory_seal_support]
+#xfail: am33_2.0-*-* mn10300-*-*
+# mn10300 has relocations in .note.gnu.property section which
 # elf_parse_notes doesn't support.
 
 #failif
index 3dd990dd68a6b976217b07649a0b7d0f2d047ba9..ee1aeb96d557fb2b8be004fcb425aa819b046b6b 100644 (file)
@@ -3,11 +3,11 @@
 #source: empty.s
 #source: property-seal-1.s
 #as: --generate-missing-build-notes=no
-#ld: -e _start
+#ld: -e _start -z nomemory-seal
 #readelf: -n
-#notarget: am33_2.0-*-* hppa*-*-hpux* mn10300-*-*
-# Assembly source file for the HPPA assembler is renamed and modifed by
-# sed.  mn10300 has relocations in .note.gnu.property section which
+#notarget: ![check_memory_seal_support]
+#xfail: am33_2.0-*-* mn10300-*-*
+# mn10300 has relocations in .note.gnu.property section which
 # elf_parse_notes doesn't support.
 
 #failif
index 0b92a8eb6ebd0afe75da9c78b60c9bd7f8f18b6b..4d9838906761e8968d20198a2a108e98ca10137a 100644 (file)
@@ -1,11 +1,7 @@
 #source: empty.s
 #ld: -shared -z memory-seal
 #readelf: -n
-#xfail: ![check_shared_lib_support]
-#notarget: am33_2.0-*-* hppa*-*-hpux* mn10300-*-*
-# Assembly source file for the HPPA assembler is renamed and modifed by
-# sed.  mn10300 has relocations in .note.gnu.property section which
-# elf_parse_notes doesn't support.
+#notarget: ![check_shared_lib_support] ![check_memory_seal_support]
 
 #...
 Displaying notes found in: .note.gnu.property
index 725911acae7d8b624d783c06c738514adcf826e1..124355443b162df884d4e12e6ab23a5aa06d380b 100644 (file)
@@ -2,10 +2,9 @@
 #source: property-seal-1.s
 #ld: -shared -z memory-seal
 #readelf: -n
-#xfail: ![check_shared_lib_support]
-#notarget: am33_2.0-*-* hppa*-*-hpux* mn10300-*-*
-# Assembly source file for the HPPA assembler is renamed and modifed by
-# sed.  mn10300 has relocations in .note.gnu.property section which
+#notarget: ![check_shared_lib_support] ![check_memory_seal_support]
+#xfail: am33_2.0-*-* mn10300-*-*
+# mn10300 has relocations in .note.gnu.property section which
 # elf_parse_notes doesn't support.
 
 #...
index 12339e83ebd5e73f06340bfe8c517fff9efebcaa..75ff151bca7a6ee46457e51ba7a51d39c3ed9ec6 100644 (file)
@@ -1,10 +1,7 @@
 #source: empty.s
 #ld: -z memory-seal
 #readelf: -n
-#notarget: am33_2.0-*-* hppa*-*-hpux* mn10300-*-*
-# Assembly source file for the HPPA assembler is renamed and modifed by
-# sed.  mn10300 has relocations in .note.gnu.property section which
-# elf_parse_notes doesn't support.
+#notarget: ![check_memory_seal_support]
 
 #...
 Displaying notes found in: .note.gnu.property
index 0c4c4e4907eeb46d383b0eb7d8f0510cfd95ff62..62c776b2b8e8d61e3d669c091874a1f313a92add 100644 (file)
@@ -2,9 +2,9 @@
 #source: property-seal-1.s
 #ld: -z memory-seal
 #readelf: -n
-#notarget: am33_2.0-*-* hppa*-*-hpux* mn10300-*-*
-# Assembly source file for the HPPA assembler is renamed and modifed by
-# sed.  mn10300 has relocations in .note.gnu.property section which
+#notarget: ![check_memory_seal_support]
+#xfail: am33_2.0-*-* mn10300-*-*
+# mn10300 has relocations in .note.gnu.property section which
 # elf_parse_notes doesn't support.
 
 #...