aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf/frame.exp
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@codesourcery.com>2011-05-12 10:00:06 +0000
committerBernd Schmidt <bernds@codesourcery.com>2011-05-12 10:00:06 +0000
commitde1491f042ec18741bc7427aeb69d9c5ffa1cbd7 (patch)
treed02d450d867c9080371ec8c0ed60a6b390ea5a51 /ld/testsuite/ld-elf/frame.exp
parent335e41d4ebaea78f4ae85792b294f183da962c85 (diff)
downloadgdb-de1491f042ec18741bc7427aeb69d9c5ffa1cbd7.zip
gdb-de1491f042ec18741bc7427aeb69d9c5ffa1cbd7.tar.gz
gdb-de1491f042ec18741bc7427aeb69d9c5ffa1cbd7.tar.bz2
* config/default.exp (ld_assemble): Pass flags parameter to
default_ld_assemble. (ld_assemble_flags): New function. * ld-elf/frame.exp: Pass -mpic and -mpid flags to the assembler on tic6x. * ld-elf/exclude.exp: Likewise. * lib/ld-lib.exp (default_ld_assemble): Take extra argument in_flags and pass it to the assembler.
Diffstat (limited to 'ld/testsuite/ld-elf/frame.exp')
-rw-r--r--ld/testsuite/ld-elf/frame.exp14
1 files changed, 11 insertions, 3 deletions
diff --git a/ld/testsuite/ld-elf/frame.exp b/ld/testsuite/ld-elf/frame.exp
index 0a69024..66e6ac5 100644
--- a/ld/testsuite/ld-elf/frame.exp
+++ b/ld/testsuite/ld-elf/frame.exp
@@ -44,14 +44,22 @@ if { [istarget "hppa64-*-*"] || [istarget "v850-*-*"] } {
return
}
+set as_opt ""
+
+# This target requires extra as options when building code for shared
+# libraries.
+if { [istarget "tic6x-*-*"] } {
+ set as_opt "-mpic -mpid=near"
+}
+
set test1 "read-only .eh_frame section"
set test2 "read-only .gcc_except_table section"
global as
global ld
-if { ![ld_assemble $as $srcdir/$subdir/tbss.s tmpdir/tbss.o ]
- || ![ld_assemble $as $srcdir/$subdir/frame.s tmpdir/frame.o] } {
+if { ![ld_assemble_flags $as $as_opt $srcdir/$subdir/tbss.s tmpdir/tbss.o ]
+ || ![ld_assemble_flags $as $as_opt $srcdir/$subdir/frame.s tmpdir/frame.o] } {
unresolved "$test1"
return
}
@@ -66,7 +74,7 @@ if { [ld_simple_link $ld tmpdir/frame.so "--shared tmpdir/frame.o tmpdir/tbss.o"
}
}
-if ![ld_assemble $as $srcdir/$subdir/table.s tmpdir/table.o ] {
+if ![ld_assemble_flags $as $as_opt $srcdir/$subdir/table.s tmpdir/table.o ] {
unresolved "$test2"
return
}