elf: handle SHN_UNDEF explicitly in ZigObject.resolveSymbols
This commit is contained in:
@@ -347,7 +347,7 @@ pub fn resolveSymbols(self: *ZigObject, elf_file: *Elf) !void {
|
||||
const global = &self.symbols.items[index];
|
||||
const esym = global.elfSym(elf_file);
|
||||
const shndx = self.symtab.items(.shndx)[global.esym_index];
|
||||
if (esym.st_shndx != elf.SHN_ABS and esym.st_shndx != elf.SHN_COMMON) {
|
||||
if (esym.st_shndx != elf.SHN_ABS and esym.st_shndx != elf.SHN_COMMON and esym.st_shndx != elf.SHN_UNDEF) {
|
||||
assert(esym.st_shndx == SHN_ATOM);
|
||||
const atom_ptr = self.atom(shndx) orelse continue;
|
||||
if (!atom_ptr.alive) continue;
|
||||
|
||||
Reference in New Issue
Block a user