mirror of
https://github.com/ziglang/zig.git
synced 2026-01-11 18:05:11 +00:00
elf: allocate locals and globals in objects
This commit is contained in:
parent
d37cb60621
commit
a9f1b994bd
@ -1666,7 +1666,7 @@ fn allocateObjects(self: *Elf) !void {
|
||||
const local = self.symbol(local_index);
|
||||
const atom_ptr = local.atom(self) orelse continue;
|
||||
if (!atom_ptr.alive) continue;
|
||||
local.value = atom_ptr.value;
|
||||
local.value += atom_ptr.value;
|
||||
}
|
||||
|
||||
for (object.globals()) |global_index| {
|
||||
@ -1674,7 +1674,7 @@ fn allocateObjects(self: *Elf) !void {
|
||||
const atom_ptr = global.atom(self) orelse continue;
|
||||
if (!atom_ptr.alive) continue;
|
||||
if (global.file_index == index) {
|
||||
global.value = atom_ptr.value;
|
||||
global.value += atom_ptr.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user