authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2024-08-13 12:08:21+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2024-08-13 13:30:24+02:00
log9daf5e81c4bdc413a3bb11c1bab207c19e6ba547
tree346d8f6b7b475c979c82598bdd3361afa3ba031f
parentdf80ccf7600818faafd485b4c01bd4fe0f26a8e5

elf: commit non-indirected symbol address to symtab


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

src/link/Elf/Symbol.zig+4-4
......@@ -300,11 +300,11 @@ pub fn setOutputSym(symbol: Symbol, elf_file: *Elf, out: *elf.Elf64_Sym) void {
300300 if (symbol.flags.is_canonical) break :blk symbol.address(.{}, elf_file);
301301 break :blk 0;
302302 }
303 if (st_shndx == elf.SHN_ABS or st_shndx == elf.SHN_COMMON) break :blk symbol.address(.{ .plt = false }, elf_file);
303 if (st_shndx == elf.SHN_ABS or st_shndx == elf.SHN_COMMON) break :blk symbol.address(.{ .plt = false, .zjt = false }, elf_file);
304304 const shdr = elf_file.shdrs.items[st_shndx];
305305 if (shdr.sh_flags & elf.SHF_TLS != 0 and file_ptr != .linker_defined)
306 break :blk symbol.address(.{ .plt = false }, elf_file) - elf_file.tlsAddress();
307 break :blk symbol.address(.{ .plt = false }, elf_file);
306 break :blk symbol.address(.{ .plt = false, .zjt = false }, elf_file) - elf_file.tlsAddress();
307 break :blk symbol.address(.{ .plt = false, .zjt = false }, elf_file);
308308 };
309309 out.st_info = (st_bind << 4) | st_type;
310310 out.st_other = esym.st_other;
......@@ -323,7 +323,7 @@ pub fn format(
323323 _ = unused_fmt_string;
324324 _ = options;
325325 _ = writer;
326 @compileError("do not format symbols directly");
326 @compileError("do not format Symbol directly");
327327}
328328
329329const FormatContext = struct {