aboutsummaryrefslogtreecommitdiff
path: root/src/link.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2023-04-01 03:08:55 -0400
committerJacob Young <jacobly0@users.noreply.github.com>2023-04-02 04:49:53 -0400
commit677427bc3ac839629654175f0a2aaaec9fd6fb6c (patch)
treedeb37ed3275cfef97f9d49d7e8a1eeea5a3c64db /src/link.zig
parentccefa9dbf5369e0fadc75b9e705e74ec96a02859 (diff)
downloadzig-677427bc3ac839629654175f0a2aaaec9fd6fb6c.tar.gz
zig-677427bc3ac839629654175f0a2aaaec9fd6fb6c.zip
x86_64: implement error name
Diffstat (limited to 'src/link.zig')
-rw-r--r--src/link.zig21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/link.zig b/src/link.zig
index 05519ba6b5..7ca94f4f6d 100644
--- a/src/link.zig
+++ b/src/link.zig
@@ -687,6 +687,7 @@ pub const File = struct {
FrameworkNotFound,
FunctionSignatureMismatch,
GlobalTypeMismatch,
+ HotSwapUnavailableOnHostOperatingSystem,
InvalidCharacter,
InvalidEntryKind,
InvalidFeatureSet,
@@ -1104,6 +1105,26 @@ pub const File = struct {
missing_libc: bool = false,
};
+ pub const LazySymbol = struct {
+ kind: enum { code, const_data },
+ ty: Type,
+
+ pub const Context = struct {
+ mod: *Module,
+
+ pub fn hash(ctx: @This(), sym: LazySymbol) u32 {
+ var hasher = std.hash.Wyhash.init(0);
+ std.hash.autoHash(&hasher, sym.kind);
+ sym.ty.hashWithHasher(&hasher, ctx.mod);
+ return @truncate(u32, hasher.final());
+ }
+
+ pub fn eql(ctx: @This(), lhs: LazySymbol, rhs: LazySymbol, _: usize) bool {
+ return lhs.kind == rhs.kind and lhs.ty.eql(rhs.ty, ctx.mod);
+ }
+ };
+ };
+
pub const C = @import("link/C.zig");
pub const Coff = @import("link/Coff.zig");
pub const Plan9 = @import("link/Plan9.zig");