ld testsuite alpha_ld_flags
Checks
Commit Message
This is how alpha can use -Ttext-segment on just those tests that need
it. And since the way run_dump_test uses $opts(ld) allows tcl procs to
be embedded, there is no need to specially expand [big_or_little_endian].
binutils/
* testsuite/lib/binutils-common.exp (run_dump_test <opts(ld)>): No
need to handle big_or_little_endian specially.
ld/
* testsuite/ld-elf/elf.exp (alpha_ld_flags): New proc.
(LDFLAGS): Don't set -Ttext-segment for alpha globally.
* testsuite/ld-elf/compress1a.d: Add alpha_ld_flags.
* testsuite/ld-elf/compressed1a.d: Likewise.
* testsuite/ld-elf/eh5.d: Likewise.
@@ -1242,9 +1242,6 @@ proc run_dump_test { name {extra_options {}} } {
lappend as_final_flags $x
}
- regsub {\[big_or_little_endian\]} $opts(ld) \
- [big_or_little_endian] opts(ld)
-
if { $opts(name) == "" } {
set base_testname "$subdir/$name"
} else {
@@ -1,6 +1,6 @@
#source: compress1.s
#as: --compress-debug-sections
-#ld: -e func_cu2
+#ld: -e func_cu2 [alpha_ld_flags]
#readelf: -S --wide
#xfail: alpha-*-*ecoff
# PR ld/25802
@@ -1,6 +1,6 @@
#source: compress1.s
#as: --compress-debug-sections=zlib-gabi
-#ld: -e func_cu2
+#ld: -e func_cu2 [alpha_ld_flags]
#readelf: -t
#xfail: alpha-*-*ecoff
# PR ld/25802
@@ -1,7 +1,7 @@
#source: eh5.s
#source: eh5a.s
#source: eh5b.s
-#ld:
+#ld: [alpha_ld_flags]
#readelf: -wf
#target: [check_as_cfi]
#xfail: alpha-*-*ecoff tile*-*-* visium-*-*
@@ -51,11 +51,15 @@ if [istarget "*-*-hpux*"] {
set ASFLAGS "$ASFLAGS --defsym HPUX=1"
}
+# Some tests expect 32-bit addresses. Force the executable to low addresses.
+proc alpha_ld_flags { } {
+ if { [istarget alpha*-*-* ] } {
+ return "-Ttext-segment 0x1000000"
+ }
+ return ""
+}
+
if { [istarget alpha*-*-* ] } {
- # The compress1 test is written expecting 32-bit addresses; force the
- # executable down into the low address space to match.
- # ??? How can we adjust just the one testcase?
- set LDFLAGS "$LDFLAGS -Ttext-segment 0x1000000"
set ASFLAGS "$ASFLAGS --defsym NO_SET=1"
}