forked from OSchip/llvm-project
parent
eba9b63cbc
commit
3d9b26b4ad
|
@ -319,14 +319,6 @@ elf::ObjectFile<ELFT>::createInputSection(const Elf_Shdr &Sec) {
|
|||
return new (IAlloc.Allocate()) InputSection<ELFT>(this, &Sec);
|
||||
}
|
||||
|
||||
// Print the module names which reference the notified
|
||||
// symbols provided through -y or --trace-symbol option.
|
||||
template <class ELFT>
|
||||
void elf::ObjectFile<ELFT>::traceUndefined(StringRef Name) {
|
||||
if (!Config->TraceSymbol.empty() && Config->TraceSymbol.count(Name))
|
||||
outs() << getFilename(this) << ": reference to " << Name << "\n";
|
||||
}
|
||||
|
||||
template <class ELFT> void elf::ObjectFile<ELFT>::initializeSymbols() {
|
||||
this->initStringTable();
|
||||
Elf_Sym_Range Syms = this->getElfSymbols(false);
|
||||
|
@ -365,7 +357,11 @@ SymbolBody *elf::ObjectFile<ELFT>::createSymbolBody(const Elf_Sym *Sym) {
|
|||
|
||||
switch (Sym->st_shndx) {
|
||||
case SHN_UNDEF:
|
||||
traceUndefined(Name);
|
||||
// Handle --trace-symbol option. Prints out a log message
|
||||
// if the current symbol is being watched. Useful for debugging.
|
||||
if (!Config->TraceSymbol.empty() && Config->TraceSymbol.count(Name))
|
||||
outs() << getFilename(this) << ": reference to " << Name << "\n";
|
||||
|
||||
return elf::Symtab<ELFT>::X
|
||||
->addUndefined(Name, Binding, Sym->st_other, Sym->getType(),
|
||||
/*CanOmitFromDynSym*/ false, this)
|
||||
|
|
|
@ -143,8 +143,6 @@ public:
|
|||
|
||||
const Elf_Shdr *getSymbolTable() const { return this->Symtab; };
|
||||
|
||||
void traceUndefined(StringRef Name);
|
||||
|
||||
// Get MIPS GP0 value defined by this file. This value represents the gp value
|
||||
// used to create the relocatable object and required to support
|
||||
// R_MIPS_GPREL16 / R_MIPS_GPREL32 relocations.
|
||||
|
|
Loading…
Reference in New Issue