mirror of
https://github.com/ziglang/zig.git
synced 2026-02-07 06:57:13 +00:00
elf: handle SHN_UNDEF explicitly in ZigObject.resolveSymbols
This commit is contained in:
parent
02f38d7749
commit
668fd7aca6
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user