aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2025-03-05 19:08:49 +0800
committerH.J. Lu <hjl.tools@gmail.com>2025-03-06 06:59:55 +0800
commit5ccf7a5512db87a8459b90ce2bb25a6aad50cb72 (patch)
treece4e32f4b134c5d7316dcd9f9fa34d359bb551fc
parent18b66eb58729a0eb61ff46f32bf4127d28b800aa (diff)
downloadbinutils-5ccf7a5512db87a8459b90ce2bb25a6aad50cb72.zip
binutils-5ccf7a5512db87a8459b90ce2bb25a6aad50cb72.tar.gz
binutils-5ccf7a5512db87a8459b90ce2bb25a6aad50cb72.tar.bz2
ld: Update PR ld/25237 test
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>
-rw-r--r--ld/testsuite/ld-elf/pr25237.d5
-rw-r--r--ld/testsuite/ld-elf/pr25237.s6
2 files changed, 7 insertions, 4 deletions
diff --git a/ld/testsuite/ld-elf/pr25237.d b/ld/testsuite/ld-elf/pr25237.d
index a85ec50..3db1877 100644
--- a/ld/testsuite/ld-elf/pr25237.d
+++ b/ld/testsuite/ld-elf/pr25237.d
@@ -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
diff --git a/ld/testsuite/ld-elf/pr25237.s b/ld/testsuite/ld-elf/pr25237.s
index 1786469..5011ffc 100644
--- a/ld/testsuite/ld-elf/pr25237.s
+++ b/ld/testsuite/ld-elf/pr25237.s
@@ -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