[PATCH] D52810: [llvm-nm] Print an explicit "no symbols" message when an object file has no symbols
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 01:33:04 PST 2020
jhenderson added a comment.
In D52810#1818209 <https://reviews.llvm.org/D52810#1818209>, @sbc100 wrote:
> I've got a fix llvm-nm that I will upload, but funnily enough it doesn't actually solve the wasm issue. The reason is that with ELF we always generate at least one local symbols (the STT_FILE symbols) so no unstripped object will ever report "no symbols". However compiling the empty file on wasm does generate file with a symbol table of size zero.. which mean the fix I'm proposing doesn't actually fix our issue.
FWIW, if you create an ELF object from an assembly file, the STT_FILE symbol will only be created if you have a .file directive.
An ELF symbol table with only the null symbol at index 0 present does result in GNU nm producing "no symbols" for me, so it's not a missing/size 0 symbol table that is exactly important, just an effectively empty table.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D52810/new/
https://reviews.llvm.org/D52810
More information about the llvm-commits
mailing list