gas: Update PR gas/33744 tests

Since .set directive doesn't work on alpha and hpux has a non-standard
common directive, skip the relevant tests on alpha and hpux.  Also allow
2, 4, 8 byte section alignment for 1-byte section since some targets
have a minimum section alignment.

	PR gas/33744
	* testsuite/gas/elf/sh-link-abs-1.d: Skip alpha and allow 1, 2,
	4, 8 byte section alignment.
	* testsuite/gas/elf/sh-link-abs-2.d: Likewise.
	* testsuite/gas/elf/sh-link-abs-3-32.d: Likewise.
	* testsuite/gas/elf/sh-link-abs-3-64.d: Likewise.
	* testsuite/gas/elf/sh-link-abs-4-32.d: Likewise
	* testsuite/gas/elf/sh-link-abs-4-64.d: Likewise
	* testsuite/gas/elf/sh-link-common-1.d: Skip hpux and allow 1,
	2, 4, 8 byte section alignment.
	* testsuite/gas/elf/sh-link-common-2.d: Likewise
	* testsuite/gas/elf/sh-link-common-3-32.d: Likewise
	* testsuite/gas/elf/sh-link-common-3-64.d: Likewise
	* testsuite/gas/elf/sh-link-common-4-32.d: Likewise
	* testsuite/gas/elf/sh-link-common-4-64.d: Likewise

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
This commit is contained in:
H.J. Lu
2026-01-17 08:48:59 +08:00
parent adc60fd9ec
commit 6b5d9284fc
12 changed files with 36 additions and 12 deletions

View File

@@ -1,6 +1,8 @@
#source: sh-link-abs.s
#readelf: -SW
#notarget: alpha*-*-*
# .set directive doesn't work on alpha ports.
#...
+\[ *[0-9]+\] +__patchable_function_entries +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+[248] +0+ +WAL +ABS +0 +1
+\[ *[0-9]+\] +__patchable_function_entries +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+[248] +0+ +WAL +ABS +0 +[1248]+
#pass

View File

@@ -1,8 +1,10 @@
#source: sh-link-abs.s
#readelf: -tW
#notarget: alpha*-*-*
# .set directive doesn't work on alpha ports.
#...
+\[ *[0-9]+\] +__patchable_function_entries
+PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+[248] +0+ +ABS +0 +1
+PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+[248] +0+ +ABS +0 +[1248]+
+\[0+83\]: WRITE, ALLOC, LINK ORDER
#pass

View File

@@ -1,6 +1,8 @@
#source: sh-link-abs.s
#readelf: -S
#notarget: alpha*-*-*
# .set directive doesn't work on alpha ports.
#...
+\[ *[0-9]+\] +__patchable_\[\.\.\.\] +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+[248] +0+ +WAL +ABS +0 +1
+\[ *[0-9]+\] +__patchable_\[\.\.\.\] +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+[248] +0+ +WAL +ABS +0 +[1248]+
#pass

View File

@@ -1,7 +1,9 @@
#source: sh-link-abs.s
#readelf: -S
#notarget: alpha*-*-*
# .set directive doesn't work on alpha ports.
#...
+\[ *[0-9]+\] +__patchable_\[\.\.\.\] +PROGBITS +[0-9a-f]+ +[0-9a-f]+
+0+[248] +0+ +WAL +ABS +0 +1
+0+[248] +0+ +WAL +ABS +0 +[1248]+
#pass

View File

@@ -1,8 +1,10 @@
#source: sh-link-abs.s
#readelf: -t
#notarget: alpha*-*-*
# .set directive doesn't work on alpha ports.
#...
+\[ *[0-9]+\] +__patchable_function_entries
+PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+[248] +0+ +ABS +0 +1
+PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+[248] +0+ +ABS +0 +[1248]+
+\[0+83\]: WRITE, ALLOC, LINK ORDER
#pass

View File

@@ -1,9 +1,11 @@
#source: sh-link-abs.s
#readelf: -t
#notarget: alpha*-*-*
# .set directive doesn't work on alpha ports.
#...
+\[ *[0-9]+\] +__patchable_function_entries
+PROGBITS +[0-9a-f]+ +[0-9a-f]+ +ABS
+0+[248] +0+ +0 +1
+0+[248] +0+ +0 +[1248]+
+\[0+83\]: WRITE, ALLOC, LINK ORDER
#pass

View File

@@ -1,6 +1,8 @@
#source: sh-link-common.s
#readelf: -SW
#notarget: *-*-hpux*
# hpux has a non-standard common directive.
#...
+\[ *[0-9]+\] +__patchable_function_entries +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+[248] +0+ +WAL +COM +0 +1
+\[ *[0-9]+\] +__patchable_function_entries +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+[248] +0+ +WAL +COM +0 +[1248]+
#pass

View File

@@ -1,8 +1,10 @@
#source: sh-link-common.s
#readelf: -tW
#notarget: *-*-hpux*
# hpux has a non-standard common directive.
#...
+\[ *[0-9]+\] +__patchable_function_entries
+PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+[248] +0+ +COM +0 +1
+PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+[248] +0+ +COM +0 +[1248]+
+\[0+83\]: WRITE, ALLOC, LINK ORDER
#pass

View File

@@ -1,6 +1,8 @@
#source: sh-link-common.s
#readelf: -S
#notarget: *-*-hpux*
# hpux has a non-standard common directive.
#...
+\[ *[0-9]+\] +__patchable_\[\.\.\.\] +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+[248] +0+ +WAL +COM +0 +1
+\[ *[0-9]+\] +__patchable_\[\.\.\.\] +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+[248] +0+ +WAL +COM +0 +[1248]+
#pass

View File

@@ -1,7 +1,9 @@
#source: sh-link-common.s
#readelf: -S
#notarget: *-*-hpux*
# hpux has a non-standard common directive.
#...
+\[ *[0-9]+\] +__patchable_\[\.\.\.\] +PROGBITS +[0-9a-f]+ +[0-9a-f]+
+0+[248] +0+ +WAL +COM +0 +1
+0+[248] +0+ +WAL +COM +0 +[1248]+
#pass

View File

@@ -1,8 +1,10 @@
#source: sh-link-common.s
#readelf: -t
#notarget: *-*-hpux*
# hpux has a non-standard common directive.
#...
+\[ *[0-9]+\] +__patchable_function_entries
+PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+[248] +0+ +COM +0 +1
+PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+[248] +0+ +COM +0 +[1248]+
+\[0+83\]: WRITE, ALLOC, LINK ORDER
#pass

View File

@@ -1,9 +1,11 @@
#source: sh-link-common.s
#readelf: -t
#notarget: *-*-hpux*
# hpux has a non-standard common directive.
#...
+\[ *[0-9]+\] +__patchable_function_entries
+PROGBITS +[0-9a-f]+ +[0-9a-f]+ +COM
+0+[248] +0+ +0 +1
+0+[248] +0+ +0 +[1248]+
+\[0+83\]: WRITE, ALLOC, LINK ORDER
#pass