diff --git a/src/MachO/Object.zig b/src/MachO/Object.zig index 6d8e79af..7d9a19f8 100644 --- a/src/MachO/Object.zig +++ b/src/MachO/Object.zig @@ -785,7 +785,7 @@ pub fn resolveSymbols(self: *Object, macho_file: *MachO) void { // Regardless of who the winner is, we still merge symbol visibility here. if (nlist.pext() or (nlist.weakDef() and nlist.weakRef()) or self.hidden) { if (symbol.visibility != .global) { - symbol.visibility = .linkage; + symbol.visibility = .hidden; } } else { symbol.visibility = .global; diff --git a/src/MachO/Symbol.zig b/src/MachO/Symbol.zig index 236135d1..841beb42 100644 --- a/src/MachO/Symbol.zig +++ b/src/MachO/Symbol.zig @@ -177,7 +177,7 @@ pub fn setOutputSym(symbol: Symbol, macho_file: *MachO, out: *macho.nlist_64) vo out.n_value = symbol.getAddress(.{}, macho_file); switch (symbol.visibility) { - .linkage => out.n_type |= macho.N_PEXT, + .hidden => out.n_type |= macho.N_PEXT, else => {}, } } else if (symbol.flags.@"export") { @@ -313,7 +313,7 @@ pub const Flags = packed struct { pub const Visibility = enum { global, - linkage, + hidden, local, };