parent
ec3af0f94e
commit
e3335d8a66
|
@ -34,8 +34,7 @@ void SymbolTable::addObject(ObjectFileBase *File) {
|
|||
|
||||
ObjectFiles.emplace_back(File);
|
||||
for (SymbolBody *Body : File->getSymbols())
|
||||
if (Body->isExternal())
|
||||
resolve(Body);
|
||||
resolve(Body);
|
||||
}
|
||||
|
||||
void SymbolTable::reportRemainingUndefines() {
|
||||
|
|
|
@ -28,10 +28,8 @@ getSymbolName(const llvm::object::ELFFile<ELFT> *F,
|
|||
|
||||
template <class ELFT>
|
||||
DefinedRegular<ELFT>::DefinedRegular(ObjectFile<ELFT> *F, const Elf_Sym *S)
|
||||
: Defined(DefinedRegularKind, getSymbolName<ELFT>(F->getObj(), S)), File(F),
|
||||
Sym(S) {
|
||||
IsExternal = S->isExternal();
|
||||
}
|
||||
: Defined(DefinedRegularKind, getSymbolName<ELFT>(F->getObj(), S)),
|
||||
File(F) {}
|
||||
|
||||
// Returns 1, 0 or -1 if this symbol should take precedence
|
||||
// over the Other, tie or lose, respectively.
|
||||
|
|
|
@ -43,9 +43,6 @@ public:
|
|||
|
||||
Kind kind() const { return static_cast<Kind>(SymbolKind); }
|
||||
|
||||
// Returns true if this is an external symbol.
|
||||
bool isExternal() const { return true; }
|
||||
|
||||
// Returns the symbol name.
|
||||
StringRef getName() const { return Name; }
|
||||
|
||||
|
@ -65,11 +62,10 @@ public:
|
|||
|
||||
protected:
|
||||
SymbolBody(Kind K, StringRef N = "")
|
||||
: SymbolKind(K), IsExternal(true), Name(N) {}
|
||||
: SymbolKind(K), Name(N) {}
|
||||
|
||||
protected:
|
||||
const unsigned SymbolKind : 8;
|
||||
unsigned IsExternal : 1;
|
||||
StringRef Name;
|
||||
Symbol *Backref = nullptr;
|
||||
};
|
||||
|
@ -99,7 +95,6 @@ public:
|
|||
|
||||
private:
|
||||
ObjectFile<ELFT> *File;
|
||||
const Elf_Sym *Sym;
|
||||
};
|
||||
|
||||
// Undefined symbols.
|
||||
|
|
Loading…
Reference in New Issue