2015-07-25 05:03:07 +08:00
|
|
|
//===- Symbols.cpp --------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Linker
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "Symbols.h"
|
2015-08-06 23:33:19 +08:00
|
|
|
#include "Error.h"
|
2015-07-29 06:58:25 +08:00
|
|
|
#include "InputFiles.h"
|
2016-02-02 05:00:35 +08:00
|
|
|
#include "InputSection.h"
|
|
|
|
#include "OutputSections.h"
|
|
|
|
#include "Target.h"
|
2015-07-25 05:03:07 +08:00
|
|
|
|
2015-09-05 06:28:10 +08:00
|
|
|
#include "llvm/ADT/STLExtras.h"
|
2016-01-14 02:55:39 +08:00
|
|
|
#include "llvm/Config/config.h"
|
|
|
|
|
|
|
|
#ifdef HAVE_CXXABI_H
|
|
|
|
#include <cxxabi.h>
|
|
|
|
#endif
|
2015-09-05 06:28:10 +08:00
|
|
|
|
|
|
|
using namespace llvm;
|
2015-07-25 05:03:07 +08:00
|
|
|
using namespace llvm::object;
|
2015-09-02 07:12:52 +08:00
|
|
|
using namespace llvm::ELF;
|
2015-07-25 05:03:07 +08:00
|
|
|
|
|
|
|
using namespace lld;
|
2016-02-28 08:25:54 +08:00
|
|
|
using namespace lld::elf;
|
2015-07-25 05:03:07 +08:00
|
|
|
|
2016-02-02 05:00:35 +08:00
|
|
|
template <class ELFT>
|
2016-03-15 07:16:09 +08:00
|
|
|
static typename ELFT::uint getSymVA(const SymbolBody &Body,
|
|
|
|
typename ELFT::uint &Addend) {
|
|
|
|
typedef typename ELFT::uint uintX_t;
|
2016-03-11 20:19:05 +08:00
|
|
|
|
|
|
|
switch (Body.kind()) {
|
|
|
|
case SymbolBody::DefinedSyntheticKind: {
|
|
|
|
auto &D = cast<DefinedSynthetic<ELFT>>(Body);
|
2016-04-01 05:26:23 +08:00
|
|
|
if (D.Value == DefinedSynthetic<ELFT>::SectionEnd)
|
|
|
|
return D.Section.getVA() + D.Section.getSize();
|
2016-03-11 20:19:05 +08:00
|
|
|
return D.Section.getVA() + D.Value;
|
2016-02-02 05:00:35 +08:00
|
|
|
}
|
2016-03-11 20:19:05 +08:00
|
|
|
case SymbolBody::DefinedRegularKind: {
|
|
|
|
auto &D = cast<DefinedRegular<ELFT>>(Body);
|
|
|
|
InputSectionBase<ELFT> *SC = D.Section;
|
2016-02-02 05:00:35 +08:00
|
|
|
|
2016-04-04 22:04:16 +08:00
|
|
|
// According to the ELF spec reference to a local symbol from outside
|
|
|
|
// the group are not allowed. Unfortunately .eh_frame breaks that rule
|
|
|
|
// and must be treated specially. For now we just replace the symbol with
|
|
|
|
// 0.
|
|
|
|
if (SC == &InputSection<ELFT>::Discarded)
|
|
|
|
return 0;
|
|
|
|
|
2016-02-02 05:00:35 +08:00
|
|
|
// This is an absolute symbol.
|
|
|
|
if (!SC)
|
2016-04-04 22:04:16 +08:00
|
|
|
return D.Value;
|
2016-02-02 05:00:35 +08:00
|
|
|
|
2016-04-04 22:04:16 +08:00
|
|
|
uintX_t Offset = D.Value;
|
|
|
|
if (D.isSection()) {
|
2016-03-11 22:21:37 +08:00
|
|
|
Offset += Addend;
|
|
|
|
Addend = 0;
|
|
|
|
}
|
|
|
|
uintX_t VA = SC->OutSec->getVA() + SC->getOffset(Offset);
|
2016-04-04 22:04:16 +08:00
|
|
|
if (D.isTls())
|
2016-03-11 22:21:37 +08:00
|
|
|
return VA - Out<ELFT>::TlsPhdr->p_vaddr;
|
|
|
|
return VA;
|
2016-02-02 05:00:35 +08:00
|
|
|
}
|
2016-03-11 20:19:05 +08:00
|
|
|
case SymbolBody::DefinedCommonKind:
|
|
|
|
return Out<ELFT>::Bss->getVA() + cast<DefinedCommon>(Body).OffsetInBss;
|
|
|
|
case SymbolBody::SharedKind: {
|
|
|
|
auto &SS = cast<SharedSymbol<ELFT>>(Body);
|
|
|
|
if (!SS.NeedsCopyOrPltAddr)
|
2016-02-09 23:11:01 +08:00
|
|
|
return 0;
|
2016-04-04 22:04:16 +08:00
|
|
|
if (SS.isFunc())
|
2016-03-11 20:19:05 +08:00
|
|
|
return Body.getPltVA<ELFT>();
|
2016-03-14 04:54:38 +08:00
|
|
|
return Out<ELFT>::Bss->getVA() + SS.OffsetInBss;
|
2016-02-02 05:00:35 +08:00
|
|
|
}
|
2016-03-11 20:19:05 +08:00
|
|
|
case SymbolBody::UndefinedElfKind:
|
|
|
|
case SymbolBody::UndefinedKind:
|
2016-02-02 05:00:35 +08:00
|
|
|
return 0;
|
2016-03-11 20:19:05 +08:00
|
|
|
case SymbolBody::LazyKind:
|
2016-03-12 16:31:34 +08:00
|
|
|
assert(Body.isUsedInRegularObj() && "lazy symbol reached writer");
|
2016-02-02 05:00:35 +08:00
|
|
|
return 0;
|
2016-03-11 20:19:05 +08:00
|
|
|
case SymbolBody::DefinedBitcodeKind:
|
2016-03-29 10:20:10 +08:00
|
|
|
llvm_unreachable("should have been replaced");
|
2016-02-02 05:00:35 +08:00
|
|
|
}
|
2016-03-12 16:31:34 +08:00
|
|
|
llvm_unreachable("invalid symbol kind");
|
2016-02-02 05:00:35 +08:00
|
|
|
}
|
|
|
|
|
2016-04-05 03:09:08 +08:00
|
|
|
SymbolBody::SymbolBody(Kind K, uint32_t NameOffset, uint8_t StOther,
|
|
|
|
uint8_t Type)
|
2016-04-04 22:04:16 +08:00
|
|
|
: SymbolKind(K), MustBeInDynSym(false), NeedsCopyOrPltAddr(false),
|
2016-04-05 03:09:08 +08:00
|
|
|
Type(Type), Binding(STB_LOCAL), StOther(StOther), NameOffset(NameOffset) {
|
2016-04-04 22:04:16 +08:00
|
|
|
IsUsedInRegularObj =
|
|
|
|
K != SharedKind && K != LazyKind && K != DefinedBitcodeKind;
|
|
|
|
}
|
|
|
|
|
2016-03-14 03:48:18 +08:00
|
|
|
// Returns true if a symbol can be replaced at load-time by a symbol
|
|
|
|
// with the same name defined in other ELF executable or DSO.
|
|
|
|
bool SymbolBody::isPreemptible() const {
|
|
|
|
if (isLocal())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
if (isShared())
|
|
|
|
return true;
|
|
|
|
|
|
|
|
if (isUndefined()) {
|
|
|
|
if (!isWeak())
|
|
|
|
return true;
|
|
|
|
|
|
|
|
// Ideally the static linker should see a definition for every symbol, but
|
|
|
|
// shared object are normally allowed to have undefined references that the
|
|
|
|
// static linker never sees a definition for.
|
|
|
|
if (Config->Shared)
|
|
|
|
return true;
|
|
|
|
|
|
|
|
// Otherwise, just resolve to 0.
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!Config->Shared)
|
|
|
|
return false;
|
|
|
|
if (getVisibility() != STV_DEFAULT)
|
|
|
|
return false;
|
2016-04-04 22:04:16 +08:00
|
|
|
if (Config->Bsymbolic || (Config->BsymbolicFunctions && isFunc()))
|
2016-03-14 03:48:18 +08:00
|
|
|
return false;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2016-03-11 20:19:05 +08:00
|
|
|
template <class ELFT>
|
2016-03-15 07:16:09 +08:00
|
|
|
typename ELFT::uint SymbolBody::getVA(typename ELFT::uint Addend) const {
|
2016-03-18 07:36:19 +08:00
|
|
|
typename ELFT::uint OutVA = getSymVA<ELFT>(*this, Addend);
|
|
|
|
return OutVA + Addend;
|
2016-03-11 20:19:05 +08:00
|
|
|
}
|
|
|
|
|
2016-03-15 07:16:09 +08:00
|
|
|
template <class ELFT> typename ELFT::uint SymbolBody::getGotVA() const {
|
2016-02-02 05:00:35 +08:00
|
|
|
return Out<ELFT>::Got->getVA() +
|
|
|
|
(Out<ELFT>::Got->getMipsLocalEntriesNum() + GotIndex) *
|
2016-03-15 07:16:09 +08:00
|
|
|
sizeof(typename ELFT::uint);
|
2016-02-02 05:00:35 +08:00
|
|
|
}
|
|
|
|
|
2016-03-15 07:16:09 +08:00
|
|
|
template <class ELFT> typename ELFT::uint SymbolBody::getGotPltVA() const {
|
|
|
|
return Out<ELFT>::GotPlt->getVA() + GotPltIndex * sizeof(typename ELFT::uint);
|
2016-02-02 05:00:35 +08:00
|
|
|
}
|
|
|
|
|
2016-03-15 07:16:09 +08:00
|
|
|
template <class ELFT> typename ELFT::uint SymbolBody::getPltVA() const {
|
2016-02-02 05:00:35 +08:00
|
|
|
return Out<ELFT>::Plt->getVA() + Target->PltZeroSize +
|
|
|
|
PltIndex * Target->PltEntrySize;
|
|
|
|
}
|
|
|
|
|
2016-04-01 05:26:23 +08:00
|
|
|
template <class ELFT> typename ELFT::uint SymbolBody::getThunkVA() const {
|
|
|
|
auto *D = cast<DefinedRegular<ELFT>>(this);
|
|
|
|
auto *S = cast<InputSection<ELFT>>(D->Section);
|
|
|
|
return S->OutSec->getVA() + S->OutSecOff + S->getThunkOff() +
|
|
|
|
ThunkIndex * Target->ThunkSize;
|
|
|
|
}
|
|
|
|
|
2016-03-15 07:16:09 +08:00
|
|
|
template <class ELFT> typename ELFT::uint SymbolBody::getSize() const {
|
2016-04-04 22:04:16 +08:00
|
|
|
if (const auto *C = dyn_cast<DefinedCommon>(this))
|
|
|
|
return C->Size;
|
|
|
|
if (const auto *DR = dyn_cast<DefinedRegular<ELFT>>(this))
|
|
|
|
return DR->Size;
|
|
|
|
if (const auto *S = dyn_cast<SharedSymbol<ELFT>>(this))
|
|
|
|
return S->Sym.st_size;
|
|
|
|
if (const auto *U = dyn_cast<UndefinedElf<ELFT>>(this))
|
|
|
|
return U->Size;
|
2016-02-03 08:12:24 +08:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-09-02 07:12:52 +08:00
|
|
|
static uint8_t getMinVisibility(uint8_t VA, uint8_t VB) {
|
|
|
|
if (VA == STV_DEFAULT)
|
|
|
|
return VB;
|
|
|
|
if (VB == STV_DEFAULT)
|
|
|
|
return VA;
|
|
|
|
return std::min(VA, VB);
|
|
|
|
}
|
|
|
|
|
2016-03-11 02:49:24 +08:00
|
|
|
static int compareCommons(DefinedCommon *A, DefinedCommon *B) {
|
2016-03-14 17:19:30 +08:00
|
|
|
if (Config->WarnCommon)
|
|
|
|
warning("multiple common of " + A->getName());
|
2016-03-11 02:58:53 +08:00
|
|
|
A->Alignment = B->Alignment = std::max(A->Alignment, B->Alignment);
|
2016-03-22 06:44:24 +08:00
|
|
|
return A->Size < B->Size ? -1 : 1;
|
2016-03-11 02:49:24 +08:00
|
|
|
}
|
|
|
|
|
2015-07-25 05:03:07 +08:00
|
|
|
// Returns 1, 0 or -1 if this symbol should take precedence
|
|
|
|
// over the Other, tie or lose, respectively.
|
2015-08-31 09:16:19 +08:00
|
|
|
template <class ELFT> int SymbolBody::compare(SymbolBody *Other) {
|
2015-09-05 06:28:10 +08:00
|
|
|
assert(!isLazy() && !Other->isLazy());
|
2016-01-19 07:54:05 +08:00
|
|
|
std::tuple<bool, bool, bool> L(isDefined(), !isShared(), !isWeak());
|
|
|
|
std::tuple<bool, bool, bool> R(Other->isDefined(), !Other->isShared(),
|
|
|
|
!Other->isWeak());
|
2015-07-28 04:39:01 +08:00
|
|
|
|
2015-08-29 04:19:34 +08:00
|
|
|
// Normalize
|
|
|
|
if (L > R)
|
2015-08-31 09:16:19 +08:00
|
|
|
return -Other->compare<ELFT>(this);
|
2015-07-25 05:03:07 +08:00
|
|
|
|
2016-04-04 22:04:16 +08:00
|
|
|
uint8_t V = getMinVisibility(getVisibility(), Other->getVisibility());
|
|
|
|
setVisibility(V);
|
|
|
|
Other->setVisibility(V);
|
2015-09-02 07:12:52 +08:00
|
|
|
|
2015-10-22 03:41:03 +08:00
|
|
|
if (IsUsedInRegularObj || Other->IsUsedInRegularObj)
|
|
|
|
IsUsedInRegularObj = Other->IsUsedInRegularObj = true;
|
2015-09-08 23:50:05 +08:00
|
|
|
|
2016-01-25 16:44:38 +08:00
|
|
|
// We want to export all symbols that exist both in the executable
|
|
|
|
// and in DSOs, so that the symbols in the executable can interrupt
|
|
|
|
// symbols in the DSO at runtime.
|
|
|
|
if (isShared() != Other->isShared())
|
|
|
|
if (isa<DefinedRegular<ELFT>>(isShared() ? Other : this))
|
2016-02-05 23:27:15 +08:00
|
|
|
MustBeInDynSym = Other->MustBeInDynSym = true;
|
2016-01-25 16:44:38 +08:00
|
|
|
|
2015-08-29 04:19:34 +08:00
|
|
|
if (L != R)
|
|
|
|
return -1;
|
2016-03-11 02:49:24 +08:00
|
|
|
if (!isDefined() || isShared() || isWeak())
|
2015-09-10 01:40:51 +08:00
|
|
|
return 1;
|
2016-03-11 02:49:24 +08:00
|
|
|
if (!isCommon() && !Other->isCommon())
|
|
|
|
return 0;
|
|
|
|
if (isCommon() && Other->isCommon())
|
|
|
|
return compareCommons(cast<DefinedCommon>(this),
|
|
|
|
cast<DefinedCommon>(Other));
|
2016-03-14 17:19:30 +08:00
|
|
|
if (Config->WarnCommon)
|
|
|
|
warning("common " + this->getName() + " is overridden");
|
2016-03-11 02:49:24 +08:00
|
|
|
return isCommon() ? -1 : 1;
|
2015-07-25 05:03:07 +08:00
|
|
|
}
|
2015-08-31 09:16:19 +08:00
|
|
|
|
2016-04-04 22:04:16 +08:00
|
|
|
Defined::Defined(Kind K, StringRef Name, uint8_t Binding, uint8_t Visibility,
|
|
|
|
uint8_t Type)
|
|
|
|
: SymbolBody(K, Name, Binding, Visibility, Type) {}
|
|
|
|
|
|
|
|
Defined::Defined(Kind K, uint32_t NameOffset, uint8_t Visibility, uint8_t Type)
|
|
|
|
: SymbolBody(K, NameOffset, Visibility, Type) {}
|
2015-12-24 08:47:42 +08:00
|
|
|
|
2016-03-08 01:14:36 +08:00
|
|
|
DefinedBitcode::DefinedBitcode(StringRef Name, bool IsWeak, uint8_t Visibility)
|
2016-04-04 22:04:16 +08:00
|
|
|
: Defined(DefinedBitcodeKind, Name, IsWeak ? STB_WEAK : STB_GLOBAL,
|
|
|
|
Visibility, 0 /* Type */) {}
|
2016-02-13 04:54:57 +08:00
|
|
|
|
|
|
|
bool DefinedBitcode::classof(const SymbolBody *S) {
|
|
|
|
return S->kind() == DefinedBitcodeKind;
|
|
|
|
}
|
|
|
|
|
2016-04-04 22:04:16 +08:00
|
|
|
Undefined::Undefined(SymbolBody::Kind K, StringRef N, uint8_t Binding,
|
|
|
|
uint8_t Other, uint8_t Type)
|
|
|
|
: SymbolBody(K, N, Binding, Other, Type), CanKeepUndefined(false) {}
|
|
|
|
|
|
|
|
Undefined::Undefined(SymbolBody::Kind K, uint32_t NameOffset,
|
2016-03-04 09:55:28 +08:00
|
|
|
uint8_t Visibility, uint8_t Type)
|
2016-04-04 22:04:16 +08:00
|
|
|
: SymbolBody(K, NameOffset, Visibility, Type), CanKeepUndefined(false) {}
|
2015-12-23 07:00:50 +08:00
|
|
|
|
|
|
|
Undefined::Undefined(StringRef N, bool IsWeak, uint8_t Visibility,
|
|
|
|
bool CanKeepUndefined)
|
2016-04-04 22:04:16 +08:00
|
|
|
: Undefined(SymbolBody::UndefinedKind, N, IsWeak ? STB_WEAK : STB_GLOBAL,
|
|
|
|
Visibility, 0 /* Type */) {
|
2015-12-23 07:00:50 +08:00
|
|
|
this->CanKeepUndefined = CanKeepUndefined;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename ELFT>
|
|
|
|
UndefinedElf<ELFT>::UndefinedElf(StringRef N, const Elf_Sym &Sym)
|
2016-04-04 22:04:16 +08:00
|
|
|
: Undefined(SymbolBody::UndefinedElfKind, N, Sym.getBinding(), Sym.st_other,
|
2016-03-04 09:55:28 +08:00
|
|
|
Sym.getType()),
|
2016-04-04 22:04:16 +08:00
|
|
|
Size(Sym.st_size) {}
|
|
|
|
|
|
|
|
template <typename ELFT>
|
|
|
|
UndefinedElf<ELFT>::UndefinedElf(uint32_t NameOffset, const Elf_Sym &Sym)
|
|
|
|
: Undefined(SymbolBody::UndefinedElfKind, NameOffset, Sym.st_other,
|
|
|
|
Sym.getType()),
|
|
|
|
Size(Sym.st_size) {
|
|
|
|
assert(Sym.getBinding() == STB_LOCAL);
|
|
|
|
}
|
2015-12-23 07:00:50 +08:00
|
|
|
|
2015-12-24 08:47:42 +08:00
|
|
|
template <typename ELFT>
|
|
|
|
DefinedSynthetic<ELFT>::DefinedSynthetic(StringRef N, uintX_t Value,
|
2016-03-02 00:23:13 +08:00
|
|
|
OutputSectionBase<ELFT> &Section,
|
|
|
|
uint8_t Visibility)
|
2016-04-04 22:04:16 +08:00
|
|
|
: Defined(SymbolBody::DefinedSyntheticKind, N, STB_GLOBAL, Visibility,
|
2016-03-04 09:55:28 +08:00
|
|
|
0 /* Type */),
|
2015-12-24 08:47:42 +08:00
|
|
|
Value(Value), Section(Section) {}
|
|
|
|
|
2015-12-25 00:23:37 +08:00
|
|
|
DefinedCommon::DefinedCommon(StringRef N, uint64_t Size, uint64_t Alignment,
|
2016-04-04 22:04:16 +08:00
|
|
|
uint8_t Binding, uint8_t Visibility, uint8_t Type)
|
|
|
|
: Defined(SymbolBody::DefinedCommonKind, N, Binding, Visibility, Type),
|
2016-03-11 02:58:53 +08:00
|
|
|
Alignment(Alignment), Size(Size) {}
|
2015-12-25 00:23:37 +08:00
|
|
|
|
2015-09-05 06:28:10 +08:00
|
|
|
std::unique_ptr<InputFile> Lazy::getMember() {
|
|
|
|
MemoryBufferRef MBRef = File->getMember(&Sym);
|
|
|
|
|
|
|
|
// getMember returns an empty buffer if the member was already
|
|
|
|
// read from the library.
|
|
|
|
if (MBRef.getBuffer().empty())
|
|
|
|
return std::unique_ptr<InputFile>(nullptr);
|
2016-02-02 16:22:41 +08:00
|
|
|
return createObjectFile(MBRef, File->getName());
|
2015-09-05 06:28:10 +08:00
|
|
|
}
|
|
|
|
|
2016-01-14 02:55:39 +08:00
|
|
|
// Returns the demangled C++ symbol name for Name.
|
2016-02-28 08:25:54 +08:00
|
|
|
std::string elf::demangle(StringRef Name) {
|
2016-01-14 02:55:39 +08:00
|
|
|
#if !defined(HAVE_CXXABI_H)
|
|
|
|
return Name;
|
|
|
|
#else
|
|
|
|
if (!Config->Demangle)
|
|
|
|
return Name;
|
2016-01-14 03:40:13 +08:00
|
|
|
|
2016-01-14 06:09:09 +08:00
|
|
|
// __cxa_demangle can be used to demangle strings other than symbol
|
|
|
|
// names which do not necessarily start with "_Z". Name can be
|
|
|
|
// either a C or C++ symbol. Don't call __cxa_demangle if the name
|
|
|
|
// does not look like a C++ symbol name to avoid getting unexpected
|
|
|
|
// result for a C symbol that happens to match a mangled type name.
|
2016-01-14 03:40:13 +08:00
|
|
|
if (!Name.startswith("_Z"))
|
|
|
|
return Name;
|
|
|
|
|
2016-01-14 02:55:39 +08:00
|
|
|
char *Buf =
|
|
|
|
abi::__cxa_demangle(Name.str().c_str(), nullptr, nullptr, nullptr);
|
|
|
|
if (!Buf)
|
|
|
|
return Name;
|
|
|
|
std::string S(Buf);
|
|
|
|
free(Buf);
|
|
|
|
return S;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2016-03-11 20:19:05 +08:00
|
|
|
template uint32_t SymbolBody::template getVA<ELF32LE>(uint32_t) const;
|
|
|
|
template uint32_t SymbolBody::template getVA<ELF32BE>(uint32_t) const;
|
|
|
|
template uint64_t SymbolBody::template getVA<ELF64LE>(uint64_t) const;
|
|
|
|
template uint64_t SymbolBody::template getVA<ELF64BE>(uint64_t) const;
|
2016-02-02 05:00:35 +08:00
|
|
|
|
|
|
|
template uint32_t SymbolBody::template getGotVA<ELF32LE>() const;
|
|
|
|
template uint32_t SymbolBody::template getGotVA<ELF32BE>() const;
|
|
|
|
template uint64_t SymbolBody::template getGotVA<ELF64LE>() const;
|
|
|
|
template uint64_t SymbolBody::template getGotVA<ELF64BE>() const;
|
|
|
|
|
|
|
|
template uint32_t SymbolBody::template getGotPltVA<ELF32LE>() const;
|
|
|
|
template uint32_t SymbolBody::template getGotPltVA<ELF32BE>() const;
|
|
|
|
template uint64_t SymbolBody::template getGotPltVA<ELF64LE>() const;
|
|
|
|
template uint64_t SymbolBody::template getGotPltVA<ELF64BE>() const;
|
|
|
|
|
|
|
|
template uint32_t SymbolBody::template getPltVA<ELF32LE>() const;
|
|
|
|
template uint32_t SymbolBody::template getPltVA<ELF32BE>() const;
|
|
|
|
template uint64_t SymbolBody::template getPltVA<ELF64LE>() const;
|
|
|
|
template uint64_t SymbolBody::template getPltVA<ELF64BE>() const;
|
|
|
|
|
2016-02-03 08:12:24 +08:00
|
|
|
template uint32_t SymbolBody::template getSize<ELF32LE>() const;
|
|
|
|
template uint32_t SymbolBody::template getSize<ELF32BE>() const;
|
|
|
|
template uint64_t SymbolBody::template getSize<ELF64LE>() const;
|
|
|
|
template uint64_t SymbolBody::template getSize<ELF64BE>() const;
|
|
|
|
|
2016-04-01 05:26:23 +08:00
|
|
|
template uint32_t SymbolBody::template getThunkVA<ELF32LE>() const;
|
|
|
|
template uint32_t SymbolBody::template getThunkVA<ELF32BE>() const;
|
|
|
|
template uint64_t SymbolBody::template getThunkVA<ELF64LE>() const;
|
|
|
|
template uint64_t SymbolBody::template getThunkVA<ELF64BE>() const;
|
|
|
|
|
2015-08-31 09:16:19 +08:00
|
|
|
template int SymbolBody::compare<ELF32LE>(SymbolBody *Other);
|
|
|
|
template int SymbolBody::compare<ELF32BE>(SymbolBody *Other);
|
|
|
|
template int SymbolBody::compare<ELF64LE>(SymbolBody *Other);
|
|
|
|
template int SymbolBody::compare<ELF64BE>(SymbolBody *Other);
|
2015-12-23 07:00:50 +08:00
|
|
|
|
2016-02-28 08:25:54 +08:00
|
|
|
template class elf::UndefinedElf<ELF32LE>;
|
|
|
|
template class elf::UndefinedElf<ELF32BE>;
|
|
|
|
template class elf::UndefinedElf<ELF64LE>;
|
|
|
|
template class elf::UndefinedElf<ELF64BE>;
|
2015-12-24 08:47:42 +08:00
|
|
|
|
2016-02-28 08:25:54 +08:00
|
|
|
template class elf::DefinedSynthetic<ELF32LE>;
|
|
|
|
template class elf::DefinedSynthetic<ELF32BE>;
|
|
|
|
template class elf::DefinedSynthetic<ELF64LE>;
|
|
|
|
template class elf::DefinedSynthetic<ELF64BE>;
|