mirror of
https://github.com/ziglang/zig.git
synced 2025-12-25 23:53:15 +00:00
elf: check for null atom in ZigModule
This commit is contained in:
parent
75f4420c2d
commit
d565f8bef2
@ -1320,7 +1320,7 @@ pub fn flushModule(self: *Elf, comp: *Compilation, prog_node: *std.Progress.Node
|
||||
if (self.zig_module_index) |index| {
|
||||
const zig_module = self.file(index).?.zig_module;
|
||||
for (zig_module.atoms.items) |atom_index| {
|
||||
const atom_ptr = self.atom(atom_index).?;
|
||||
const atom_ptr = self.atom(atom_index) orelse continue;
|
||||
if (!atom_ptr.flags.alive) continue;
|
||||
const shdr = &self.shdrs.items[atom_ptr.outputShndx().?];
|
||||
if (shdr.sh_type == elf.SHT_NOBITS) continue;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user