aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.zig
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2022-12-02 17:13:52 +0100
committerGitHub <noreply@github.com>2022-12-02 17:13:52 +0100
commit16dc86a49e1e92d036d196be40a4fc073314bcf7 (patch)
tree8842f844da54874ff384398382bf3b2374a071a4 /src/codegen.zig
parent665eba93c1733f83614c443c19cd9a5f1be910df (diff)
parentbfd36cbf97bfa012e5c399c16578b8756782e1d8 (diff)
downloadzig-16dc86a49e1e92d036d196be40a4fc073314bcf7.tar.gz
zig-16dc86a49e1e92d036d196be40a4fc073314bcf7.zip
Merge pull request #13730 from ziglang/gen-dwarf-simple
dwarf: dedup generation of dwarf info for func args and vars in Dwarf module
Diffstat (limited to 'src/codegen.zig')
-rw-r--r--src/codegen.zig13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/codegen.zig b/src/codegen.zig
index 5a28ce1860..d6b2ed7d93 100644
--- a/src/codegen.zig
+++ b/src/codegen.zig
@@ -68,6 +68,19 @@ pub const DebugInfoOutput = union(enum) {
none,
};
+/// Helper struct to denote that the value is in memory but requires a linker relocation fixup:
+/// * got - the value is referenced indirectly via GOT entry index (the linker emits a got-type reloc)
+/// * direct - the value is referenced directly via symbol index index (the linker emits a displacement reloc)
+/// * import - the value is referenced indirectly via import entry index (the linker emits an import-type reloc)
+pub const LinkerLoad = struct {
+ type: enum {
+ got,
+ direct,
+ import,
+ },
+ sym_index: u32,
+};
+
pub fn generateFunction(
bin_file: *link.File,
src_loc: Module.SrcLoc,