mirror of
https://github.com/N64Recomp/N64Recomp.git
synced 2026-05-05 00:12:25 +00:00
Warn if an STT_FUNC has zero size.
This commit is contained in:
parent
ba4aede49c
commit
ce7402cf78
1 changed files with 7 additions and 3 deletions
|
|
@ -795,6 +795,10 @@ bool read_symbols(RecompPort::Context& context, const ELFIO::elfio& elf_file, EL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!ignored && type == ELFIO::STT_FUNC && num_instructions == 0 && bind != ELFIO::STB_WEAK) {
|
||||||
|
fmt::print(stderr, "[WARN] Function '{}' has zero size.\n", name);
|
||||||
|
}
|
||||||
|
|
||||||
// Suffix local symbols to prevent name conflicts.
|
// Suffix local symbols to prevent name conflicts.
|
||||||
if (bind == ELFIO::STB_LOCAL) {
|
if (bind == ELFIO::STB_LOCAL) {
|
||||||
name = fmt::format("{}_{:08X}", name, rom_address);
|
name = fmt::format("{}_{:08X}", name, rom_address);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue