summaryrefslogtreecommitdiffstats
path: root/lld/ELF
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF')
-rw-r--r--lld/ELF/Relocations.cpp2
-rw-r--r--lld/ELF/SymbolTable.cpp11
-rw-r--r--lld/ELF/SymbolTable.h1
-rw-r--r--lld/ELF/Writer.cpp3
4 files changed, 1 insertions, 16 deletions
diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp
index 854711bfa8b..467219ad054 100644
--- a/lld/ELF/Relocations.cpp
+++ b/lld/ELF/Relocations.cpp
@@ -1010,7 +1010,7 @@ static void scanReloc(InputSectionBase &Sec, OffsetGetter &GetOffset, RelTy *&I,
}
// If a relocation needs PLT, we create PLT and GOTPLT slots for the symbol.
- if (needsPlt(Expr) && !Sym.isInPlt() && Sym.IsUsedInRegularObj) {
+ if (needsPlt(Expr) && !Sym.isInPlt()) {
if (Sym.isGnuIFunc() && !Sym.IsPreemptible)
addPltEntry<ELFT>(InX::Iplt, InX::IgotPlt, InX::RelaIplt,
Target->IRelativeRel, Sym);
diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp
index c52ec8fa925..1f5a84ec2c7 100644
--- a/lld/ELF/SymbolTable.cpp
+++ b/lld/ELF/SymbolTable.cpp
@@ -212,17 +212,6 @@ void SymbolTable::applySymbolWrap() {
}
}
-// Apply changes caused by relocations to wrapped symbols
-// This is needed for direct calls to __wrap_sym
-void SymbolTable::applySymbolWrapReloc() {
- for (WrappedSymbol &W : WrappedSymbols) {
- memcpy(W.Wrap, W.Sym, sizeof(SymbolUnion));
-
- // Keep this so that this copy of the symbol remains dropped
- W.Wrap->IsUsedInRegularObj = false;
- }
-}
-
static uint8_t getMinVisibility(uint8_t VA, uint8_t VB) {
if (VA == STV_DEFAULT)
return VB;
diff --git a/lld/ELF/SymbolTable.h b/lld/ELF/SymbolTable.h
index 4c5e276db35..5e6d44dfe4f 100644
--- a/lld/ELF/SymbolTable.h
+++ b/lld/ELF/SymbolTable.h
@@ -39,7 +39,6 @@ public:
template <class ELFT> void addCombinedLTOObject();
template <class ELFT> void addSymbolWrap(StringRef Name);
void applySymbolWrap();
- void applySymbolWrapReloc();
ArrayRef<Symbol *> getSymbols() const { return SymVector; }
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index f141eaee368..533ac47f937 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -1567,9 +1567,6 @@ template <class ELFT> void Writer<ELFT>::finalizeSections() {
if (!Config->Relocatable)
forEachRelSec(scanRelocations<ELFT>);
- // Apply changes caused by relocations to wrapped symbols
- Symtab->applySymbolWrapReloc();
-
if (InX::Plt && !InX::Plt->empty())
InX::Plt->addSymbols();
if (InX::Iplt && !InX::Iplt->empty())
OpenPOWER on IntegriCloud