commit 66f34b15e8573d669ef99d47337162f2aa91d602 (tree)
parent 2c2bc66ce160989734ba6772fa75a870795d9356
Author: Jakub Konka <kubkon@jakubkonka.com>
Date: Tue, 3 Oct 2023 22:28:45 +0200
elf: add symbols to .got section directly
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/link/Elf.zig b/src/link/Elf.zig
@@ -1762,8 +1762,8 @@ fn scanRelocs(self: *Elf) !void {
for (self.symbols.items, 0..) |*sym, sym_index| {
if (sym.flags.needs_got) {
log.debug("'{s}' needs GOT", .{sym.name(self)});
- // TODO how can we tell we need to write it again, aka the entry is dirty?
- _ = try sym.getOrCreateGotEntry(@intCast(sym_index), self);
+ _ = try self.got.addGotSymbol(@intCast(sym_index), self);
+ sym.flags.has_got = true;
}
}
}