Fix corner case with findSymbol in elf2rpl

This commit is contained in:
shinyquagsire23 2016-07-23 18:01:54 -07:00
parent 1ff6658dcc
commit 2574e29958

View File

@ -89,6 +89,12 @@ struct InputSection
static ElfFile::Symbol *
findSymbol(ElfFile &file, uint32_t address)
{
for (auto &symbol : file.symbols) {
if (symbol->address == address && symbol->type != elf::STT_NOTYPE) {
return symbol.get();
}
}
for (auto &symbol : file.symbols) {
if (symbol->address == address) {
return symbol.get();