Fix search in TUI
[deliverable/binutils-gdb.git] / ld / testsuite / ld-elf / shared.exp
index c894d2196b68ddb96f4babb60313270bc5e8c696..7852890999a1b8fc5234a5f050d491ddeb2879f2 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for various ELF tests.
-#   Copyright (C) 2006-2018 Free Software Foundation, Inc.
+#   Copyright (C) 2006-2020 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -358,14 +358,14 @@ run_ld_link_tests [list \
 ] "bfin-*-*"
 
 # Targets that use _bfd_generic_link_add_symbols won't pass pr21703 tests
-# Not will hppa64 with dot-symbols.
+# Nor will hppa64 with dot-symbols.
 run_ld_link_tests [list \
     [list "PR ld/21703 shared" \
        "-shared --allow-multiple-definition --version-script pr21703.ver\
         tmpdir/pr21703-3.o tmpdir/pr21703-4.o" "" "$AFLAGS_PIC" \
        {pr21703-3.s pr21703-4.s} {{readelf {--dyn-syms} pr21703-shared.sd}} \
        "pr21703.so" ] \
-] "d30v-*-*" "dlx-*-*" "pj-*-*" "hppa64-*-*" "xgate-*-*"
+] \[is_generic\] hppa64-*-*
 
 # This target requires extra GAS options when building non-PIC code
 # for linking with shared libraries.
@@ -432,7 +432,8 @@ run_ld_link_tests [list \
     [list "Build pr20995-2.so" \
        "-shared -z relro" "" "$AFLAGS_PIC" \
        {pr20995c.s} {{readelf {-l --wide} pr20995-2so.r}} "pr20995-2.so"] \
-] "tic6x-*-*" "arm*-*-eabi*" "hppa*64*-*-hpux*" "aarch64*-*-elf*"
+] "tic6x-*-*" "arm*-*-eabi*" "hppa*64*-*-hpux*" "aarch64*-*-elf*" \
+  "*-*-lynxos*" "arm*-*-nto*" "i?86-*-nto*" "sh*-*-nto*"
 
 # These targets don't copy dynamic variables into .bss.
 setup_xfail "alpha-*-*" "bfin-*-*" "ia64-*-*" "xtensa-*-*"
@@ -452,13 +453,15 @@ run_ld_link_tests [list \
     [list \
        "pr20995-2" \
        "$LFLAGS" "tmpdir/pr20995-2.so" "$AFLAGS_NONPIC" \
-       {pr20995a.s} {{readelf {-S --wide} pr20995.r}} "pr20995-2"]]
+       {pr20995a.s} {{readelf {-S --wide} pr20995.r}} "pr20995-2"]
+] "*-*-lynxos*" "arm*-*-nto*" "i?86-*-nto*" "sh*-*-nto*"
 
 run_ld_link_tests [list \
     [list "Build pr22374 shared library" \
        "-shared" "" "$AFLAGS_PIC" "pr22374b.s" {} "pr22374.so" ] \
 ]
 if { ![istarget "alpha-*-*"]
+     && ![istarget "csky-*-*"]
      && ![istarget "frv-*-*"]
      && ![istarget "hppa*-*-*"]
      && ![istarget "i?86-*-*"]
@@ -495,7 +498,7 @@ if { [istarget *-*-linux*]
 }
 
 # Check to see if the C compiler works
-if { [which $CC] == 0 } {
+if { ![check_compiler_available] } {
     return
 }
 
@@ -741,12 +744,19 @@ set build_tests {
   {"Build libpr18458b.so"
    "-shared -Wl,-z,now tmpdir/libpr18458a.so" "-fPIC"
    {pr18458b.c} {} "libpr18458b.so"}
-  {"Build pr19073a.o"
-   "-r -nostdlib" ""
-   {pr19073.s} {} "pr19073a.o"}
-  {"Build libpr19073.so"
-   "-shared -Wl,--version-script=pr19073.map tmpdir/pr19073a.o" "-fPIC"
-   {dummy.c} {{readelf {--dyn-syms --wide} pr19073.rd}} "libpr19073.so"}
+}
+# pr19073.s uses .set, which has a different meaning on alpha.
+if { ![istarget alpha-*-*] } {
+    append build_tests {
+       {"Build pr19073a.o"
+        "-r -nostdlib" ""
+        {pr19073.s} {} "pr19073a.o"}
+       {"Build libpr19073.so"
+        "-shared -Wl,--version-script=pr19073.map tmpdir/pr19073a.o" "-fPIC"
+        {dummy.c} {{readelf {--dyn-syms --wide} pr19073.rd}} "libpr19073.so"}
+    }
+}
+append build_tests {
   {"Build pr21964-1a.so"
    "-shared" "-fPIC"
    {pr21964-1a.c} {} "pr21964-1a.so"}
@@ -771,8 +781,8 @@ run_cc_link_tests $build_tests
 
 run_ld_link_tests [list \
     [list \
-       "Build pr22269-1" \
-       "-pie -e _start --no-dynamic-linker -z text" \
+       "pr22269-1 (static pie undefined weak)" \
+       "-pie -e _start --no-dynamic-linker -z text -z nocombreloc " \
        "" \
        "$AFLAGS_PIC" \
        { pr22269-1.c } \
@@ -1051,7 +1061,7 @@ if { [istarget *-*-linux*]
        ] \
        [list \
            "Build pr19579a.o" \
-           "" "-fPIE" \
+           "" "-fPIE -fcommon" \
            {pr19579a.c} \
            {} \
            "libpr19579a.a" \
@@ -1059,7 +1069,7 @@ if { [istarget *-*-linux*]
        [list \
            "Build libpr19579.so" \
            "-shared" \
-           "-fPIC" \
+           "-fPIC -fcommon" \
            {pr19579b.c} \
            {} \
            "libpr19579.so" \
@@ -1067,7 +1077,7 @@ if { [istarget *-*-linux*]
        [list \
            "Build libpr19579now.so" \
            "-shared -Wl,-z,now" \
-           "-fPIC" \
+           "-fPIC -fcommon" \
            {pr19579b.c} \
            {} \
            "libpr19579.so" \
This page took 0.02539 seconds and 4 git commands to generate.