diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-07-13 19:26:06 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-07-13 19:26:06 +0000 |
| commit | 267829774358b5aebd3e726ae318813bd48129bb (patch) | |
| tree | 5a8904da0d9716ea10b69258f5d50e0b1ee2ec2c /ELF/InputSection.cpp | |
| parent | 0317860f00ca8e821989c92c8a6cc461fd5f2009 (diff) | |
Notes
Diffstat (limited to 'ELF/InputSection.cpp')
| -rw-r--r-- | ELF/InputSection.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ELF/InputSection.cpp b/ELF/InputSection.cpp index b1d5e13494605..c6a539b8dfa52 100644 --- a/ELF/InputSection.cpp +++ b/ELF/InputSection.cpp @@ -276,7 +276,9 @@ template <class ELFT> std::string InputSectionBase::getSrcMsg(uint64_t Offset) { template <class ELFT> std::string InputSectionBase::getObjMsg(uint64_t Off) { // Synthetic sections don't have input files. elf::ObjectFile<ELFT> *File = getFile<ELFT>(); - std::string Filename = File ? File->getName() : "(internal)"; + if (!File) + return ("(internal):(" + Name + "+0x" + utohexstr(Off) + ")").str(); + std::string Filename = File->getName(); std::string Archive; if (!File->ArchiveName.empty()) @@ -466,7 +468,7 @@ static uint64_t getAArch64UndefinedRelativeWeakVA(uint64_t Type, uint64_t A, static uint64_t getARMStaticBase(const SymbolBody &Body) { OutputSection *OS = Body.getOutputSection(); if (!OS || !OS->FirstInPtLoad) - fatal("SBREL relocation to " + Body.getName() + " without static base\n"); + fatal("SBREL relocation to " + Body.getName() + " without static base"); return OS->FirstInPtLoad->Addr; } |
