Commit 668fd7aca6
Changed files (1)
src
link
src/link/Elf/ZigObject.zig
@@ -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;