]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
ld: Update PR ld/25237 test
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 5 Mar 2025 11:08:49 +0000 (19:08 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 5 Mar 2025 22:59:55 +0000 (06:59 +0800)
1. Skip targets which don't support the .bss section alignment, 1 << 16.
2. Replace .bss with ".section .bss".
3. Use ".zero 0xb60000" for targets which pad the section to its alignment.

PR ld/25237
* testsuite/ld-elf/pr25237.d: Skip avr-*-* and h8300-*-*.
Update expected segment size to 0xb60000.
* testsuite/ld-elf/pr25237.s: Use ".section .bss" and
".zero 0xb60000".

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
ld/testsuite/ld-elf/pr25237.d
ld/testsuite/ld-elf/pr25237.s

index a85ec501f6cf1f72b79e2f27bdc29a11cfcc8ccd..3db187738f3f0fcfa8eee973e91fa0c1cb545074 100644 (file)
@@ -1,6 +1,9 @@
 #ld:
 #readelf: -l -W
+# Address bits of these targets don't support the .bss section alignment,
+# 1 << 16.
+#notarget: avr-*-* h8300-*-*
 
 #...
- +LOAD +0x0+ +0x[0-9a-f]+ +0x[0-9a-f]+ +0x0+ +0xb5dce8+ +RW +0x10000
+ +LOAD +0x0+ +0x[0-9a-f]+ +0x[0-9a-f]+ +0x0+ +0xb60000+ +RW +0x10000
 #pass
index 17864696feeab689b25e534f62822f224401b18d..5011ffc10d144a5aaff95ab0c77c2dc017494680 100644 (file)
@@ -10,10 +10,10 @@ main:
        .globl  _main   /* Used by LynxOS targets.  */
 _main:
        .dc.a 0
-       .bss
+       .section        .bss, "aw", %nobits
        .p2align 16
        .type   bss, %object
-       .size   bss, 11918568
+       .size   bss, 0xb60000
 bss:
-       .zero   11918568
+       .zero   0xb60000
        .section        .note.GNU-stack,"",%progbits