diff options
author | Alan Modra <amodra@gmail.com> | 2017-11-12 17:41:50 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-11-14 19:53:35 +1030 |
commit | 640d0ed874167d73b11dfbf5e838c65cc43e6a63 (patch) | |
tree | be372638fe50c51c026c5b3b44dbbc0462cb1120 /ld/testsuite/ld-ifunc | |
parent | be92cb147d77d0ebc6a084a18627d800a9da9f95 (diff) | |
download | binutils-640d0ed874167d73b11dfbf5e838c65cc43e6a63.zip binutils-640d0ed874167d73b11dfbf5e838c65cc43e6a63.tar.gz binutils-640d0ed874167d73b11dfbf5e838c65cc43e6a63.tar.bz2 |
ld-ifunc non-PIC tests
* testsuite/ld-ifunc/ifunc.exp: Ensure non-PIC tests are really
not PIE by default gcc options.
Diffstat (limited to 'ld/testsuite/ld-ifunc')
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc.exp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ld/testsuite/ld-ifunc/ifunc.exp b/ld/testsuite/ld-ifunc/ifunc.exp index 9445f9f..4ef66ed 100644 --- a/ld/testsuite/ld-ifunc/ifunc.exp +++ b/ld/testsuite/ld-ifunc/ifunc.exp @@ -164,7 +164,7 @@ if ![ld_compile "$CC -c -fPIC" "$srcdir/$subdir/prog.c" "tmpdir/shared_prog.o"] fail "Could not create a PIC object file" set fails [expr $fails + 1] } -if ![ld_compile "$CC -c" "$srcdir/$subdir/prog.c" "tmpdir/static_prog.o"] { +if ![ld_compile "$CC -c $NOPIE_CFLAGS" "$srcdir/$subdir/prog.c" "tmpdir/static_prog.o"] { fail "Could not create a non-PIC object file" set fails [expr $fails + 1] } @@ -172,7 +172,7 @@ if ![ld_compile "$CC -c -fPIC -DWITH_IFUNC" "$srcdir/$subdir/lib.c" "tmpdir/shar fail "Could not create a PIC object file containing an IFUNC symbol" set fails [expr $fails + 1] } -if ![ld_compile "$CC -c -DWITH_IFUNC" "$srcdir/$subdir/lib.c" "tmpdir/static_ifunc.o"] { +if ![ld_compile "$CC -c $NOPIE_CFLAGS -DWITH_IFUNC" "$srcdir/$subdir/lib.c" "tmpdir/static_ifunc.o"] { fail "Could not create a non-PIC object file containing an IFUNC symbol" set fails [expr $fails + 1] } @@ -214,7 +214,7 @@ if ![ld_link $CC "tmpdir/dynamic_prog" "-Wl,--no-as-needed,-rpath=./tmpdir,-Bdyn fail "Could not link a dynamic executable" set fails [expr $fails + 1] } -if ![ld_link $CC "tmpdir/local_prog" "-Wl,--no-as-needed,-rpath=./tmpdir -Ltmpdir tmpdir/static_prog.o -lifunc"] { +if ![ld_link $CC "tmpdir/local_prog" "$NOPIE_LDFLAGS -Wl,--no-as-needed,-rpath=./tmpdir -Ltmpdir tmpdir/static_prog.o -lifunc"] { fail "Could not link a dynamic executable using local ifunc" set fails [expr $fails + 1] } |