diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2018-02-06 22:59:24 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2018-02-06 22:59:24 +0000 |
| commit | 339dbb8af2a7372bb79cdb8f5a9d87138b50e3da (patch) | |
| tree | 44f58b80668a19d2e502367d26cb9002df46ff67 /lld | |
| parent | 637aafc4516594b058453f34c2a4f0496fd80d41 (diff) | |
| download | bcm5719-llvm-339dbb8af2a7372bb79cdb8f5a9d87138b50e3da.tar.gz bcm5719-llvm-339dbb8af2a7372bb79cdb8f5a9d87138b50e3da.zip | |
Convert a use of Config->Static.
In lld this was the only use of Config->Static where it meant anything
else other than "use .a instead of .so".
If a program turns out to not use any dynamic libraries, we should
produce the same result with and without -static.
llvm-svn: 324421
Diffstat (limited to 'lld')
| -rw-r--r-- | lld/ELF/Writer.cpp | 2 | ||||
| -rw-r--r-- | lld/test/ELF/gnu-ifunc-dynsym.s | 6 |
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 |

