PR ld/15428: MIPS/LD/testsuite: Un-KFAIL `__ehdr_start' test 2
[deliverable/binutils-gdb.git] / ld / testsuite / ld-elfvsb / elfvsb.exp
index 05771467bc7ce501d381d3ec3dd75a3b333465bf..e20cd766a6121e9629ee86fe340e61fbe07587d3 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for ld-visibility tests
-#   Copyright (C) 2000-2014 Free Software Foundation, Inc.
+#   Copyright (C) 2000-2016 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -62,6 +62,7 @@ if ![isnative] then {return}
 set tmpdir tmpdir
 set SHCFLAG ""
 set shared_needs_pic "no"
+set COMPRESS_LDFLAG "-Wl,--compress-debug-sections=zlib-gabi"
 
 if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
 
@@ -227,6 +228,8 @@ proc visibility_run {visibility} {
     global target_triplet
     global support_protected
     global shared_needs_pic
+    global PLT_CFLAGS
+    global COMPRESS_LDFLAG
 
     if [ string match $visibility "hidden" ] {
        set VSBCFLAG "-DHIDDEN_TEST"
@@ -259,8 +262,9 @@ proc visibility_run {visibility} {
        # functions and variables not being overridable.  Newer versions
        # of gcc are more likely to do this.
     } else {
-    # Compile the main program.
-    if ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o] {
+    # Compile the main program.  Make sure that PLT is used since PLT
+    # is expected.
+    if ![ld_compile "$CC -g $PLT_CFLAGS $CFLAGS $SHCFLAG $VSBCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o] {
        unresolved "visibility ($visibility) (non PIC)"
        unresolved "visibility ($visibility)"
     } else {
@@ -269,9 +273,9 @@ proc visibility_run {visibility} {
        # although it will be less efficient because the dynamic linker
        # will need to do more relocation work.  However, note that not
        # using -fpic will cause some of the tests to return different
-       # results.
-       if { ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG" $srcdir/$subdir/sh1.c $tmpdir/sh1np.o]
-            || ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG" $srcdir/$subdir/sh2.c $tmpdir/sh2np.o] } {
+       # results.  Make sure that PLT is used since PLT is expected.
+       if { ![ld_compile "$CC -g $PLT_CFLAGS $CFLAGS $SHCFLAG $VSBCFLAG" $srcdir/$subdir/sh1.c $tmpdir/sh1np.o]
+            || ![ld_compile "$CC -g $PLT_CFLAGS $CFLAGS $SHCFLAG $VSBCFLAG" $srcdir/$subdir/sh2.c $tmpdir/sh2np.o] } {
            unresolved "visibility ($visibility) (non PIC)"
        } else { if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
            visibility_test $visibility vnp "visibility ($visibility) (non PIC)" mainnp.o sh1np.o sh2np.o xcoff
@@ -382,7 +386,7 @@ proc visibility_run {visibility} {
            } else { if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
                visibility_test $visibility vp "visibility ($visibility)" mainnp.o sh1p.o sh2p.o xcoff
            } else {
-               visibility_test $visibility vp "visibility ($visibility)" mainnp.o sh1p.o sh2p.o elfvsb
+               visibility_test $visibility vp "visibility ($visibility)" mainnp.o sh1p.o sh2p.o elfvsb $COMPRESS_LDFLAG
            } }
        }
     }}
This page took 0.024251 seconds and 4 git commands to generate.