From 25c53f08a6add493043a407ce15bc727dc33356d Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Tue, 31 Oct 2023 13:27:47 +0100 Subject: elf: redo strings management in the linker * atom names - are stored locally and pulled from defining object's strtab * local symbols - same * global symbols - in principle, we could store them locally, but for better debugging experience - when things go wrong - we store the offsets in a global strtab used by the symbol resolver --- src/link/Dwarf.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/link/Dwarf.zig') diff --git a/src/link/Dwarf.zig b/src/link/Dwarf.zig index 82cd6153de..3bfe744443 100644 --- a/src/link/Dwarf.zig +++ b/src/link/Dwarf.zig @@ -23,7 +23,7 @@ abbrev_table_offset: ?u64 = null, /// TODO replace with InternPool /// Table of debug symbol names. -strtab: StringTable(.strtab) = .{}, +strtab: StringTable = .{}, /// Quick lookup array of all defined source files referenced by at least one Decl. /// They will end up in the DWARF debug_line header as two lists: @@ -2760,6 +2760,6 @@ const LinkFn = File.LinkFn; const LinkerLoad = @import("../codegen.zig").LinkerLoad; const Module = @import("../Module.zig"); const InternPool = @import("../InternPool.zig"); -const StringTable = @import("strtab.zig").StringTable; +const StringTable = @import("StringTable.zig"); const Type = @import("../type.zig").Type; const Value = @import("../value.zig").Value; -- cgit v1.2.3