Skip to documentation
SLOP

tiny.choir.backends.artifact.model.linkage.relocation

Reference tiny.choir backends artifact model linkage relocation

Defined in backends.artifact.model.linkage.

API (5)

Actions

Public operations.

Types and contracts

Public types and contracts.

No direct callersNo direct callsbackends.artifact.model.linkagerelocation
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Called byCallsNo direct callstest sourcelib.tldr.src.formats.elf.relocation.applicationtest: parallel relocation application...backends.artifact.Relocationdeinit
Static calls · unresolved targets: 0 · external targets: 1.

Source: lib/choir/src/backends/artifact/model/linkage/relocation.zig

zig
const std = @import("std");const linkage = @import("root.zig");const Allocator = std.mem.Allocator;pub const RelocationKind = enum(u8) {    unknown = 1,    call = 2,    absolute = 3,    relative = 4,    got = 5,    plt = 6,};pub const Relocation = struct {    offset: u64,    symbol: []const u8,    kind: RelocationKind = .unknown,    addend: i64 = 0,    width_bits: ?u16 = null,    pub fn dupe(self: Relocation, allocator: Allocator) Allocator.Error!Relocation {        return .{            .offset = self.offset,            .symbol = try linkage.slice.dupe(allocator, self.symbol),            .kind = self.kind,            .addend = self.addend,            .width_bits = self.width_bits,        };    }    pub fn deinit(self: Relocation, allocator: Allocator) void {        linkage.slice.free(allocator, self.symbol);    }    pub fn eql(self: Relocation, other: Relocation) bool {        return self.offset == other.offset and            self.kind == other.kind and            self.addend == other.addend and            self.width_bits == other.width_bits and            std.mem.eql(u8, self.symbol, other.symbol);    }};

Source: lib/choir/src/backends/artifact/model/linkage/root.zig:6

zig
pub const relocation = @import("relocation.zig");

Audit

Definitions6
Public names21
Members11
Version26.7.0
Revisiondaab053ee433