forked from OSchip/llvm-project
parent
be65b24a55
commit
5f7e6e6cfb
|
@ -550,12 +550,14 @@ static std::string getLocation(SymbolBody &Sym, InputSectionBase<ELFT> &S,
|
|||
if (SrcFile.empty())
|
||||
SrcFile = Sym.File ? getFilename(Sym.File) : getFilename(File);
|
||||
|
||||
DefinedRegular<ELFT> *Encl = getSymbolAt(&S, Offset);
|
||||
if (Encl && Encl->Type == STT_FUNC) {
|
||||
StringRef Func = getSymbolName(*File, *Encl);
|
||||
// Find a symbol at a given location.
|
||||
DefinedRegular<ELFT> *Sym = getSymbolAt(&S, Offset);
|
||||
if (Sym && Sym->Type == STT_FUNC) {
|
||||
StringRef Func = getSymbolName(*File, *Sym);
|
||||
return SrcFile + " (function " + maybeDemangle(Func) + ")";
|
||||
}
|
||||
|
||||
// If there's no symbol, print out the offset instead of a symbol name.
|
||||
return (SrcFile + " (" + S.Name + "+0x" + Twine::utohexstr(Offset) + ")")
|
||||
.str();
|
||||
}
|
||||
|
|
|
@ -323,7 +323,7 @@ template <class ELFT> void Writer<ELFT>::run() {
|
|||
if (Config->ExitEarly) {
|
||||
// Flush the output streams and exit immediately. A full shutdown is a good
|
||||
// test that we are keeping track of all allocated memory, but actually
|
||||
// freeing it is a wast of time in a regular linker run.
|
||||
// freeing it is a waste of time in a regular linker run.
|
||||
outs().flush();
|
||||
errs().flush();
|
||||
_exit(0);
|
||||
|
|
Loading…
Reference in New Issue