summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/Writer.cpp2
-rw-r--r--lld/test/ELF/gnu-ifunc-dynsym.s6
2 files changed, 6 insertions, 2 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 3063dd81a1f..eddf1741436 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -837,7 +837,7 @@ void PhdrEntry::add(OutputSection *Sec) {
// need these symbols, since IRELATIVE relocs are resolved through GOT
// and PLT. For details, see http://www.airs.com/blog/archives/403.
template <class ELFT> void Writer<ELFT>::addRelIpltSymbols() {
- if (!Config->Static)
+ if (needsInterpSection())
return;
StringRef S = Config->IsRela ? "__rela_iplt_start" : "__rel_iplt_start";
addOptionalRegular(S, InX::RelaIplt, 0, STV_HIDDEN, STB_WEAK);
diff --git a/lld/test/ELF/gnu-ifunc-dynsym.s b/lld/test/ELF/gnu-ifunc-dynsym.s
index fca15462dcb..3d98ac3a4cf 100644
--- a/lld/test/ELF/gnu-ifunc-dynsym.s
+++ b/lld/test/ELF/gnu-ifunc-dynsym.s
@@ -1,7 +1,11 @@
+// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
+
// RUN: ld.lld -static -export-dynamic %t.o -o %tout
// RUN: llvm-nm -U %tout | FileCheck %s
-// REQUIRES: x86
+
+// RUN: ld.lld -export-dynamic %t.o -o %tout
+// RUN: llvm-nm -U %tout | FileCheck %s
// CHECK: __rela_iplt_end
// CHECK: __rela_iplt_start
OpenPOWER on IntegriCloud