diff options
Diffstat (limited to 'ld/testsuite/ld-elf')
-rw-r--r-- | ld/testsuite/ld-elf/exclude.exp | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/frame.exp | 14 |
2 files changed, 21 insertions, 5 deletions
diff --git a/ld/testsuite/ld-elf/exclude.exp b/ld/testsuite/ld-elf/exclude.exp index 124549f..28a34ab 100644 --- a/ld/testsuite/ld-elf/exclude.exp +++ b/ld/testsuite/ld-elf/exclude.exp @@ -31,6 +31,14 @@ if { [istarget "mcore-*-*"] } { 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" +} + global ar global as global ld @@ -47,8 +55,8 @@ set test7 "ld exclude symbols from archive - --exclude-libs foo:libexclude.a" set test8 "ld exclude symbols from archive - --exclude-libs foo,libexclude.a" set test9 "ld don't exclude symbols from archive - --exclude-libs foo:bar" -if { ![ld_assemble $as $srcdir/$subdir/exclude1.s tmpdir/exclude1.o ] - || ![ld_assemble $as $srcdir/$subdir/exclude2.s tmpdir/exclude2.o] } { +if { ![ld_assemble_flags $as $as_opt $srcdir/$subdir/exclude1.s tmpdir/exclude1.o ] + || ![ld_assemble_flags $as $as_opt $srcdir/$subdir/exclude2.s tmpdir/exclude2.o] } { unresolved $test1 return } 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 } |