aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-ifunc/ifunc.exp
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-03-08 09:42:01 -0800
committerH.J. Lu <hjl.tools@gmail.com>2016-03-08 09:42:16 -0800
commitd1ed1c7d69e6656de213b12594e702afec31a66d (patch)
tree3655317b5954f23c569e10eb0506078c6593dd2a /ld/testsuite/ld-ifunc/ifunc.exp
parent205ac185771460838370afb3a38d20228927b925 (diff)
downloadbinutils-d1ed1c7d69e6656de213b12594e702afec31a66d.zip
binutils-d1ed1c7d69e6656de213b12594e702afec31a66d.tar.gz
binutils-d1ed1c7d69e6656de213b12594e702afec31a66d.tar.bz2
Handle local IFUNC symbols in shared object
Increment PLT reference count for locally defined local IFUNC symbols in shared object since STT_GNU_IFUNC symbol must go through PLT even if it is locally defined and undefined symbol may turn out to be a STT_GNU_IFUNC symbol later. bfd/ PR ld/19784 * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference count for locally defined local IFUNC symbols in shared object. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. ld/ PR ld/19784 * testsuite/ld-i386/i386.exp: Remove pr19636-2e-nacl test. * testsuite/ld-i386/pr19636-2e-nacl.d: Moved to ... * testsuite/ld-i386/pr19636-2e.d: Here. Remove notarget. * testsuite/ld-ifunc/ifunc.exp: Run PR ld/19784 tests. * testsuite/ld-ifunc/pass.out: New file. * testsuite/ld-ifunc/pr19784a.c: Likewise. * testsuite/ld-ifunc/pr19784b.c: Likewise. * testsuite/ld-ifunc/pr19784c.c: Likewise.
Diffstat (limited to 'ld/testsuite/ld-ifunc/ifunc.exp')
-rw-r--r--ld/testsuite/ld-ifunc/ifunc.exp40
1 files changed, 40 insertions, 0 deletions
diff --git a/ld/testsuite/ld-ifunc/ifunc.exp b/ld/testsuite/ld-ifunc/ifunc.exp
index 96627e7..e860f36 100644
--- a/ld/testsuite/ld-ifunc/ifunc.exp
+++ b/ld/testsuite/ld-ifunc/ifunc.exp
@@ -505,6 +505,30 @@ run_cc_link_tests [list \
{} \
"libpr18841c.so" \
] \
+ [list \
+ "Build libpr19784a.so" \
+ "-shared -Wl,-Bsymbolic-functions" \
+ "-fPIC -O2 -g" \
+ { pr19784b.c pr19784c.c } \
+ {} \
+ "libpr19784a.so" \
+ ] \
+ [list \
+ "Build libpr19784b.so" \
+ "-shared -Wl,-Bsymbolic-functions" \
+ "-fPIC -O2 -g" \
+ { pr19784c.c pr19784b.c } \
+ {} \
+ "libpr19784b.so" \
+ ] \
+ [list \
+ "Build pr19784a.o" \
+ "" \
+ "" \
+ { pr19784a.c } \
+ "" \
+ "" \
+ ] \
]
run_ld_link_exec_tests [] [list \
@@ -532,4 +556,20 @@ run_ld_link_exec_tests [] [list \
"pr18841c" \
"pr18841.out" \
] \
+ [list \
+ "Run pr19784a" \
+ "tmpdir/pr19784a.o tmpdir/libpr19784a.so" \
+ "" \
+ { dummy.c } \
+ "pr19784a" \
+ "pass.out" \
+ ] \
+ [list \
+ "Run pr19784b" \
+ "--as-needed tmpdir/pr19784a.o tmpdir/libpr19784b.so" \
+ "" \
+ { dummy.c } \
+ "pr19784b" \
+ "pass.out" \
+ ] \
]