authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2023-10-03 22:28:45+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2023-10-16 19:33:04+02:00
log66f34b15e8573d669ef99d47337162f2aa91d602
tree8c8d4773cbd5058623069c2b7fb729c4712747da
parent2c2bc66ce160989734ba6772fa75a870795d9356

elf: add symbols to .got section directly


1 files changed, 2 insertions(+), 2 deletions(-)

src/link/Elf.zig+2-2
...@@ -1762,8 +1762,8 @@ fn scanRelocs(self: *Elf) !void {...@@ -1762,8 +1762,8 @@ fn scanRelocs(self: *Elf) !void {
1762 for (self.symbols.items, 0..) |*sym, sym_index| {1762 for (self.symbols.items, 0..) |*sym, sym_index| {
1763 if (sym.flags.needs_got) {1763 if (sym.flags.needs_got) {
1764 log.debug("'{s}' needs GOT", .{sym.name(self)});1764 log.debug("'{s}' needs GOT", .{sym.name(self)});
1765 // TODO how can we tell we need to write it again, aka the entry is dirty?1765 _ = try self.got.addGotSymbol(@intCast(sym_index), self);
1766 _ = try sym.getOrCreateGotEntry(@intCast(sym_index), self);1766 sym.flags.has_got = true;
1767 }1767 }
1768 }1768 }
1769}1769}