summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Symbols.cpp
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2016-02-02 09:28:53 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2016-02-02 09:28:53 +0000
commit5c36e5938dbb2d4c135819189fd68fdb5982850c (patch)
tree8654b9b81ffc4ff91f2dc73f1331349777ac7812 /lld/ELF/Symbols.cpp
parentffe19f524548fd8b4e16db4c6bd3528850890e00 (diff)
downloadbcm5719-llvm-5c36e5938dbb2d4c135819189fd68fdb5982850c.tar.gz
bcm5719-llvm-5c36e5938dbb2d4c135819189fd68fdb5982850c.zip
[ELF] Implemented -Bsymbolic-functions command line option
-Bsymbolic-functions: When creating a shared library, bind references to global function symbols to the definition within the shared library, if any. This patch also fixed behavior of already existent -Bsymbolic: previously PLT entries were created even if -Bsymbolic was specified. Differential revision: http://reviews.llvm.org/D16411 llvm-svn: 259481
Diffstat (limited to 'lld/ELF/Symbols.cpp')
-rw-r--r--lld/ELF/Symbols.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp
index c8b8891b6b1..30b086f68db 100644
--- a/lld/ELF/Symbols.cpp
+++ b/lld/ELF/Symbols.cpp
@@ -146,12 +146,13 @@ template <class ELFT> int SymbolBody::compare(SymbolBody *Other) {
}
Defined::Defined(Kind K, StringRef Name, bool IsWeak, uint8_t Visibility,
- bool IsTls)
- : SymbolBody(K, Name, IsWeak, Visibility, IsTls) {}
+ bool IsTls, bool IsFunction)
+ : SymbolBody(K, Name, IsWeak, Visibility, IsTls, IsFunction) {}
Undefined::Undefined(SymbolBody::Kind K, StringRef N, bool IsWeak,
uint8_t Visibility, bool IsTls)
- : SymbolBody(K, N, IsWeak, Visibility, IsTls), CanKeepUndefined(false) {}
+ : SymbolBody(K, N, IsWeak, Visibility, IsTls, /*IsFunction*/ false),
+ CanKeepUndefined(false) {}
Undefined::Undefined(StringRef N, bool IsWeak, uint8_t Visibility,
bool CanKeepUndefined)
@@ -170,12 +171,14 @@ UndefinedElf<ELFT>::UndefinedElf(StringRef N, const Elf_Sym &Sym)
template <typename ELFT>
DefinedSynthetic<ELFT>::DefinedSynthetic(StringRef N, uintX_t Value,
OutputSectionBase<ELFT> &Section)
- : Defined(SymbolBody::DefinedSyntheticKind, N, false, STV_DEFAULT, false),
+ : Defined(SymbolBody::DefinedSyntheticKind, N, false, STV_DEFAULT,
+ /*IsTls*/ false, /*IsFunction*/ false),
Value(Value), Section(Section) {}
DefinedCommon::DefinedCommon(StringRef N, uint64_t Size, uint64_t Alignment,
bool IsWeak, uint8_t Visibility)
- : Defined(SymbolBody::DefinedCommonKind, N, IsWeak, Visibility, false) {
+ : Defined(SymbolBody::DefinedCommonKind, N, IsWeak, Visibility,
+ /*IsTls*/ false, /*IsFunction*/ false) {
MaxAlignment = Alignment;
this->Size = Size;
}
OpenPOWER on IntegriCloud