ld: Add -static-pie tests
[deliverable/binutils-gdb.git] / ld / testsuite / ld-ifunc / ifunc.exp
index 5fee56d3bf60a6e3cfcd4edeaaa91fc98d0aa5a2..e13b5615ff3e645a846f29ac4eab42eb981fa416 100644 (file)
@@ -1,6 +1,6 @@
 # Expect script for linker support of IFUNC symbols and relocations.
 #
-#   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+#   Copyright (C) 2009-2019 Free Software Foundation, Inc.
 #   Contributed by Red Hat.
 #
 # This file is part of the GNU Binutils.
@@ -45,6 +45,12 @@ if ![check_shared_lib_support] {
     return
 }
 
+global ASFLAGS
+set saved_ASFLAGS "$ASFLAGS"
+if { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } {
+    set ASFLAGS "$ASFLAGS -mx86-used-note=no"
+}
+
 # This test does not need a compiler...
 run_dump_test "ifuncmod5"
 
@@ -713,7 +719,9 @@ run_ld_link_exec_tests [list \
 # That does not happen for the pr23169 testcase where the resolver is
 # in the executable (which is relocated last by ld.so).
 if { [isnative]
-     && !([istarget "powerpc-*-*"] || [istarget "aarch64*-*-*"]) } {
+     && !([istarget "powerpc-*-*"]
+           || [istarget "aarch64*-*-*"]
+           || [istarget "sparc*-*-*"]) } {
 run_ld_link_exec_tests [list \
     [list \
        "Run pr23169a" \
@@ -769,4 +777,20 @@ run_ld_link_exec_tests [list \
        "pass.out" \
        "-fPIE -O2 -g" \
     ] \
-]}
+]
+if { $STATIC_PIE_LDFLAGS != "" } then {
+    run_ld_link_exec_tests [list \
+       [list \
+           "Run pr23169g" \
+           "$STATIC_PIE_LDFLAGS" \
+           "" \
+           { pr23169a.c pr23169b.c pr23169c.c } \
+           "pr23169g" \
+           "pass.out" \
+           "-fPIE -O2 -g" \
+       ] \
+]
+}
+}
+
+set ASFLAGS "$saved_ASFLAGS"
This page took 0.024324 seconds and 4 git commands to generate.