Not only symbols (like sections) have names, in case where we fail to create relocation against such symbol, we should not print out an empty string, instead we should print a generic message.
Details
Details
Diff Detail
Diff Detail
Event Timeline
ELF/Relocations.cpp | ||
---|---|---|
431 | This is a bit scattered. What we want to do here is (1) to get a symbol name, and (2) if it fails use "readonly sement" instead. So how about defining StringRef getSymbolName(elf::ObjectFile<ELFT> &File, SymbolBody &Body) which returns the symbol name or the empty string? |
Now that this is the only place where getLocalSymbolName is called, so let's inline that function and remove getLocalSymbolName.