aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-ifunc/ifunc.exp
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-04-19 09:59:14 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-04-19 09:59:30 -0700
commite492d2f8ac653b050019865ba1418fc5b057c00b (patch)
tree03eb796ac523898976f1199254204e20cb9b11c6 /ld/testsuite/ld-ifunc/ifunc.exp
parenta6c21d4a553de184562fd8409a5bcd3f2cc2561a (diff)
downloadbinutils-e492d2f8ac653b050019865ba1418fc5b057c00b.zip
binutils-e492d2f8ac653b050019865ba1418fc5b057c00b.tar.gz
binutils-e492d2f8ac653b050019865ba1418fc5b057c00b.tar.bz2
x86-64: Handle undefined IFUNC symbol with -z now
Since undefined IFUNC symbol is treated as normal FUNC symbol, don't abort on undefined IFUNC symbol in the second PLT. bfd/ PR ld/21401 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort on on undefined IFUNC symbol in the second PLT. ld/ PR ld/21401 * testsuite/ld-ifunc/ifunc.exp: Add a libtest-2-now.so test with -z now.
Diffstat (limited to 'ld/testsuite/ld-ifunc/ifunc.exp')
-rw-r--r--ld/testsuite/ld-ifunc/ifunc.exp8
1 files changed, 8 insertions, 0 deletions
diff --git a/ld/testsuite/ld-ifunc/ifunc.exp b/ld/testsuite/ld-ifunc/ifunc.exp
index ffff2f1..13d50a5 100644
--- a/ld/testsuite/ld-ifunc/ifunc.exp
+++ b/ld/testsuite/ld-ifunc/ifunc.exp
@@ -234,6 +234,10 @@ if ![ld_link $ld "tmpdir/libtest-2.so" "-shared tmpdir/test-2.o"] {
fail "Could not link libtest-2.so"
set fails [expr $fails + 1]
}
+if ![ld_link $ld "tmpdir/libtest-2-now.so" "-shared -z now tmpdir/test-2.o"] {
+ fail "Could not link libtest-2-now.so"
+ set fails [expr $fails + 1]
+}
if { $fails == 0 } {
pass "Building ifunc binaries"
@@ -306,6 +310,10 @@ if {[contains_ifunc_symbol tmpdir/libtest-2.so] != 0} {
fail "libtest-2.so contains IFUNC symbols"
set fails [expr $fails + 1]
}
+if {[contains_ifunc_symbol tmpdir/libtest-2-now.so] != 0} {
+ fail "libtest-2-now.so contains IFUNC symbols"
+ set fails [expr $fails + 1]
+}
# The linked ifunc using executables and shared libraries should contain
# a dynamic reloc referencing the IFUNC symbol. (Even the static