PR 32896 testcase

Alan Modra amodra@gmail.com
Tue Apr 29 23:59:31 GMT 2025


Modify it a little to run on more targets.

diff --git a/ld/testsuite/ld-elf/tbss4.d b/ld/testsuite/ld-elf/tbss4.d
index 77a865b5e1a..336ed8f2700 100644
--- a/ld/testsuite/ld-elf/tbss4.d
+++ b/ld/testsuite/ld-elf/tbss4.d
@@ -1,9 +1,13 @@
-#ld: -e _start --rosegment -z separate-code -z max-page-size=0x1000 -z common-page-size=0x1000
-#readelf: -l --wide
-#target: x86_64-*-linux* i?86-*-linux-gnu i?86-*-gnu*
+#ld: -e _start -Ttext=0x1000 -z max-page-size=0x1000 -z common-page-size=0x1000 -z noseparate-code
+#readelf: -lSW
+#target: *-linux* *-gnu*
+#notarget: hppa64-*-* ia64-*-*
 
 #...
- +TLS +0x0+1014 .*
+.* \.tbss +NOBITS +0+1014 +0+1014 +0+4 +0+ +WAT +0 +0 +4
+
+#...
+ +TLS +0x0*1014 +0x0+1014 +0x0+1014 +0x0+ +0x0+4 R +0x4
 #...
 .* \.tbss 
 #pass
diff --git a/ld/testsuite/ld-elf/tbss4.s b/ld/testsuite/ld-elf/tbss4.s
index 1e7ec3efb0c..f49491e0e99 100644
--- a/ld/testsuite/ld-elf/tbss4.s
+++ b/ld/testsuite/ld-elf/tbss4.s
@@ -5,11 +5,11 @@
 	.section	.gcc_except_table,"aw",%progbits
 # Alignment is needed -- otherwise gcc_except_table start position seems to
 # be adjusted so that the tbss section is fully aligned.
-	.align 4
+	.balign 4
 	.ascii "Odd number of chars"
 
 	.section	.tbss,"awT",%nobits
-	.align 4
+	.balign 4
 	.type	xyz, %object
 	.size	xyz, 4
 xyz:
@@ -17,7 +17,7 @@ xyz:
 
 	.data
 dataval:
-	.align 4
+	.balign 4
 	.ascii "x"
 
 	.text

-- 
Alan Modra


More information about the Binutils mailing list