Change the way we create the symbol table to be closer to how its down on ELF.
Now the output symbol table matches the internal symtab data structure more closely
and includes local and undefined symbols.
Fixes PR40204
Differential D56947
[WebAssembly] Fix crash with LTO + relocatable + undefined symbols Authored by sbc100 on Jan 18 2019, 4:44 PM.
Details Change the way we create the symbol table to be closer to how its down on ELF. Fixes PR40204
Diff Detail
Event Timeline
| ||||||||||
Maybe this would be better as
for (Symbol *Sym : Symtab->getSymbols()) { // handle global symbols } for (ObjFile *File : Symtab->ObjectFiles) { for (Symbol *Sym : File->getSymbols()) { if (!Sym->isLocal()) continue; // handle local/section symbols } }? I believe that's how we handle .symtab in ELF for example.