]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - ld/testsuite/ld-elf/shared.exp
Emit a warning when -z relro is unsupported
[thirdparty/binutils-gdb.git] / ld / testsuite / ld-elf / shared.exp
index 9d72cad78d6c326644821192e9f395cce4df02b0..8f4ed71de5576a907fc658ef6eb93fc0a5dbd383 100644 (file)
@@ -454,16 +454,6 @@ run_ld_link_tests [list \
        {pr20995b.s} {} "pr20995.so"] \
 ]
 
-# xfail on arm*-*-eabi*.  The list can be enlarged to those targets that
-# don't support GNU_RELRO.  For more details, please see discussions at:
-#   https://sourceware.org/ml/binutils/2017-01/msg00441.html
-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*" \
-  "*-*-lynxos*" "arm*-*-nto*" "i?86-*-nto*" "sh*-*-nto*"
-
 # These targets don't copy dynamic variables into .bss.
 setup_xfail "alpha-*-*" "bfin-*-*" "ia64-*-*" "xtensa-*-*"
 # or don't have .data.rel.ro
@@ -474,16 +464,22 @@ run_ld_link_tests [list \
        "$LFLAGS" "tmpdir/pr20995.so" "$AFLAGS_NONPIC" \
        {pr20995a.s} {{readelf {-S --wide} pr20995.r}} "pr20995"]]
 
-# xfail on arm*-*-eabi* is particularly because of no support of GNU_RELRO.
-# Please see the link above for details.
-setup_xfail "alpha-*-*" "bfin-*-*" "ia64-*-*" "xtensa-*-*" "arm*-*-eabi*"
-setup_xfail "hppa*64*-*-hpux*" "aarch64*-*-elf*" "tic6x-*-*"
+# xfail on targets that don't support GNU_RELRO.
+#   For more details, please see discussions at:
+#   https://sourceware.org/ml/binutils/2017-01/msg00441.html
+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"] \
+] {![check_relro_support]}
+
+setup_xfail alpha-*-* xtensa-*-*
 run_ld_link_tests [list \
     [list \
        "pr20995-2" \
        "$LFLAGS" "tmpdir/pr20995-2.so" "$AFLAGS_NONPIC" \
        {pr20995a.s} {{readelf {-S --wide} pr20995.r}} "pr20995-2"]
-] "*-*-lynxos*" "arm*-*-nto*" "i?86-*-nto*" "sh*-*-nto*"
+] {![check_relro_support]}
 
 run_ld_link_tests [list \
     [list "Build pr22374 shared library" \