diff --git a/src/link/Elf/Atom.zig b/src/link/Elf/Atom.zig index e42ddace4e3a28ebf973dae549fb26983ae2b9c0..9720da571804ef30d5beea9c227760d53d38a85f 100644 --- a/src/link/Elf/Atom.zig +++ b/src/link/Elf/Atom.zig @@ -697,6 +697,8 @@ fn reportUndefined( } pub fn resolveRelocsAlloc(self: Atom, elf_file: *Elf, code: []u8) !void { + relocs_log.debug("0x{x}: {s}", .{ self.value, self.name(elf_file) }); + const file_ptr = self.file(elf_file).?; var stream = std.io.fixedBufferStream(code); const cwriter = stream.writer(); diff --git a/src/link/Elf/synthetic_sections.zig b/src/link/Elf/synthetic_sections.zig index 63848f05fd1e47e66f5d30e1f24bd67a8127f732..1f336043e86a56a4649d87430f47cbb03535780d 100644 --- a/src/link/Elf/synthetic_sections.zig +++ b/src/link/Elf/synthetic_sections.zig @@ -795,6 +795,8 @@ pub const PltGotSection = struct { pub fn addSymbol(plt_got: *PltGotSection, sym_index: Symbol.Index, elf_file: *Elf) !void { const index = @as(u32, @intCast(plt_got.symbols.items.len)); const symbol = elf_file.symbol(sym_index); + symbol.flags.has_plt = true; + symbol.flags.has_got = true; if (symbol.extra(elf_file)) |extra| { var new_extra = extra; new_extra.plt_got = index;