# installed, but to the O32 ABI in the build tree, because of some
# specs-file hacks. Make sure we use an ABI that is compatible with
# the one we expect.
-if {[istarget mips*64*-*-linux*] && ![istarget mips*64*-*-linux-gnuabi64] &&
+if {[istarget mips64*-*-linux*] &&
(![board_info [target_info name] exists multilib_flags] ||
![string match "*-mabi" [board_info [target_info name] multilib_flags]])
} {
default_ld_exec $target $output
}
-#
-# xfail_from_runlist
-# mark a test xfail and remove it from the runlist
-proc xfail_from_runlist { runlist name } {
- set i 0
- set rtl $runlist
- foreach t $runlist {
- set tn [lindex $t 0]
- if [string equal $name $tn] {
- xfail $tn
- set rtl [lreplace $rtl $i $i]
- }
- incr i
- }
- return $rtl
-}
-
-
# From gas-defs.exp, to support run_dump_test.
if ![info exists AS] then {
set AS $as
foreach t [list indirect5a indirect5b indirect6a indirect6b] {
set testname [concat $t "dynsym"]
- if { [istarget mips*] } {
- xfail $testname
- } elseif { [check_dynamic_syms tmpdir/$t] } {
+ if { [check_dynamic_syms tmpdir/$t] } {
pass $testname
} else {
fail $testname
foreach t [list indirect5c indirect5d indirect6c indirect6d] {
set testname [concat $t "dynsym"]
- if { [istarget mips*] } {
- xfail $testname
- } elseif { [check_dynamic_syms tmpdir/$t] } {
+ if { [check_dynamic_syms tmpdir/$t] } {
pass $testname
} else {
fail $testname
#...
- +[0-9]+ +(\.MIPS\.abiflags \.MIPS\.options \.dynamic \.hash \.dynsym \.dynstr \.text |)\.interp \.note.4 \.note.1 \.note.2 \.note.3.*
+ +[0-9]+ +\.interp \.note.4 \.note.1 \.note.2 \.note.3.*
#...
+[0-9]+ +\.note\.4 \.note\.1 +
+[0-9]+ +\.note\.2 .note\.3 +
{"Build libpr16496b.a"
"" "-fPIC"
{pr16496b.c} {} "libpr16496b.a"}
+ {"Build libpr16496b.so"
+ "-shared -Wl,--no-as-needed tmpdir/pr16496b.o tmpdir/libpr16496a.so" ""
+ {dummy.c} {{objdump {-R} pr16496b.od}} "libpr16496b.so"}
{"Build libpr16452a.so"
"-shared -Wl,-soname,libpr16452a.so,--version-script=pr16452.map" "-fPIC"
{pr16452a.c} {} "libpr16452a.so"}
{pr18458b.c} {} "libpr18458b.so"}
}
-# MIPS PIC uses different way: .MIPS.stub
-if { ![istarget mips*-linux*] } {
- append build_tests {
- {"Build libpr16496b.so"
- "-shared -Wl,--no-as-needed tmpdir/pr16496b.o tmpdir/libpr16496a.so" ""
- {dummy.c} {{objdump {-R} pr16496b.od}} "libpr16496b.so"}
- }
-}
-
run_cc_link_tests [list \
[list \
"Build libpr2404a.so" \
# This test fails on MIPS. On the MIPS we must put foo in the dynamic
# symbol table, which the test does not expect.
-setup_xfail "mips*-*-irix*" "mips*-linux-*"
+setup_xfail "mips*-*-irix*"
build_exec "vers4" vers4.c vers4 "" "" "" "" vers4.sym
build_exec "vers4a" vers4.c vers4a "-Wl,-export-dynamic" "" vers4a.ver vers4a.dsym vers4a.sym
# Verify that --no-export-dynamic undoes the effect of --export-dynamic.
-setup_xfail "mips*-*-irix*" "mips*-linux-*"
+setup_xfail "mips*-*-irix*"
build_exec "vers4b" vers4.c vers4b "-Wl,-export-dynamic -Wl,--no-export-dynamic" "" "" "" vers4.sym
if [istarget sparc*-*-*] {
set as_pic_flags "-K PIC"
}
-if { ![istarget mips*-*-*] } {
- run_ld_link_tests [list "\"vers24a\"
+run_ld_link_tests [list "\"vers24a\"
\"-shared --version-script $srcdir/$subdir/vers24.map\" \"\"
\"$as_pic_flags $as_options\" {vers24a.c vers24b.c} { { readelf -Wrs vers24.rd } }
\"libvers24a.so\" \"-fpic\""]
- run_ld_link_tests [list "\"vers24b\"
+run_ld_link_tests [list "\"vers24b\"
\"-shared --version-script $srcdir/$subdir/vers24.map\" \"\"
\"$as_pic_flags $as_options\" {vers24b.c vers24a.c} { { readelf -Wrs vers24.rd } }
\"libvers24b.so\" \"-fpic\""]
- run_ld_link_tests [list "\"vers24c\"
+run_ld_link_tests [list "\"vers24c\"
\"-shared --version-script $srcdir/$subdir/vers24.map\" \"\"
\"$as_pic_flags $as_options\" {vers24c.c} { { readelf -Wrs vers24.rd } }
\"libvers24c.so\" \"-fpic\""]
-}
# Test versioned definition vs. normal definition in different files.
if [string match "yes" $pic] then {
}
}
-set save_asflags $ASFLAGS
-if { [istarget "mips*-*-linux*"] } {
- append ASFLAGS " -KPIC"
-}
set symdefs ""
if [is_pecoff_format] {
set symdefs {{ld {--defsym __main=main --defsym ___main=main}}}
}
run_dump_test "pr19161" $symdefs
}
-set ASFLAGS $save_asflags
if { [is_elf_format] && [check_shared_lib_support] \
&& [check_compiler_available] } {
}
run_dump_test_o32 "mips16-local-stubs-1"
-run_dump_test_n32 "mips16-local-stubs-1" noarch
+run_dump_test_n32 "mips16-local-stubs-1"
set mips16_fp_stub_test [list \
[list "Floating-point stub for mips16 functions" \
# when using the LTO plugin. The HPPA target however requires an
# executable stack for syscall restarts and signal returns, so we
# skip this test for that target.
-if { ! [istarget "hppa*-*-*"] && ! [istarget "mips*-linux*"] } {
+if { ! [istarget "hppa*-*-*"] } {
lappend lto_link_elf_tests \
[list "PR ld/12982" \
"-O2 -flto -fuse-linker-plugin" "-O2 -flto" \
}
}
-set save_asflags $ASFLAGS
-if { [istarget "mips*-*-linux*"] } {
- append ASFLAGS " -KPIC"
-}
# Run "ld -r" to generate inputs for complex LTO tests.
run_dump_test "lto-3r"
remote_exec host "mv" "tmpdir/dump tmpdir/lto-3.o"
"-r tmpdir/pr19317.o" "" "" \
{dummy.s} {} "pr19317-r.o"] \
]
-set ASFLAGS $save_asflags
-if { [istarget "mips*-*-linux*"] } {
- set lto_run_tests [xfail_from_runlist $lto_run_tests "PR ld/15323 (4)"]
- set lto_run_tests [xfail_from_runlist $lto_run_tests "PR ld/19317 (3)"]
-}
run_ld_link_exec_tests $lto_run_tests
if { [is_elf_format] } {
return
}
-if { [istarget "mips*-*-linux*"] } {
- set plugin_tests [xfail_from_runlist $plugin_tests "plugin claimfile lost symbol"]
- set plugin_tests [xfail_from_runlist $plugin_tests "plugin claimfile replace symbol"]
- set plugin_tests [xfail_from_runlist $plugin_tests "plugin claimfile resolve symbol"]
- set plugin_tests [xfail_from_runlist $plugin_tests "plugin claimfile lost symbol with source"]
- set plugin_tests [xfail_from_runlist $plugin_tests "plugin claimfile replace symbol with source"]
- set plugin_tests [xfail_from_runlist $plugin_tests "plugin claimfile resolve symbol with source"]
- set plugin_tests [xfail_from_runlist $plugin_tests "plugin claimfile resolve symbol with source"]
-}
run_ld_link_tests $plugin_tests
if { [is_elf_format] \
# Check if ar --plugin works.
file delete tmpdir/libfunc.a
-if { [istarget "mips*-*-linux*"] } {
- set plugin_src_tests [xfail_from_runlist $plugin_src_tests "plugin 2 with source lib"]
- set plugin_src_tests [xfail_from_runlist $plugin_src_tests "load plugin 2 with source"]
- set plugin_src_tests [xfail_from_runlist $plugin_src_tests "plugin 3 with source lib"]
- set plugin_src_tests [xfail_from_runlist $plugin_src_tests "load plugin 3 with source"]
-}
if [ar_simple_create $ar "--plugin $plugin2_path" "tmpdir/libfunc.a" \
"tmpdir/main.o $srcdir/$subdir/func.c"] {
set testname "ar --plugin"
if [istarget mips*-*] {
# MIPS16 doesn't support PIC code.
- set cflags "-mno-abicalls -fno-PIC $cflags"
+ set cflags "-mno-abicalls $cflags"
# MIPS ELF uses __start by default, we override it.
set ldflags "-e _start $ldflags"
}
|| ![ld_compile "$CC_FOR_TARGET $PLT_CFLAGS $SHCFLAG" $srcdir/$subdir/sh2.c $tmpdir/sh2np.o] } {
unsupported "shared (non PIC)"
} else { if { [is_xcoff_format] } {
- shared_test shnp "shared (non PIC)" mainnp.o sh1np.o sh2np.o xcoff
+ shared_test shnp "shared (nonPIC)" mainnp.o sh1np.o sh2np.o xcoff
} else {
# Solaris defaults to -z text.
setup_xfail "*-*-solaris2*"
setup_xfail "arm*-*-linux*"
}
setup_xfail "aarch64*-*-linux*"
- setup_xfail "mips*-*-linux*"
shared_test shnp "shared (non PIC)" mainnp.o sh1np.o sh2np.o shared
# Test ELF shared library relocations with a non-zero load
setup_xfail "arm*-*-linux*"
}
setup_xfail "aarch64*-*-linux*"
- setup_xfail "mips*-*-linux*"
shared_test shmpnp "shared (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o shared
}
} else {