Merge pull request #13 from shinyquagsire23/findsymbol-fix

Fix corner case with findSymbol in elf2rpl
This commit is contained in:
James 2016-07-24 02:06:10 +01:00 committed by GitHub
commit c9f357d695

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();