diff --git a/src/link/Elf/Atom.zig b/src/link/Elf/Atom.zig index e42ddace4e..9720da5718 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 63848f05fd..1f336043e8 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;