authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2026-10-16 09:46:09+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2026-10-16 09:56:43+01:00
log6882d5022d1eae5659f634de44dcb2a352e18712
treee33bc65d9de70ca1d4c586c666f85c95d4f6b6eb
parenteaf90d33ed1bd5c2eab446af5fb1b81e232d05b7
signature Commit is signed but in an unrecognized format.

MachO2: set ext bit on pext nlists in objects


1 files changed, 6 insertions(+), 3 deletions(-)

src/link/MachO2.zig+6-3
...@@ -1363,9 +1363,12 @@ fn addGlobalSymbol(macho: *MachO, opts: struct {...@@ -1363,9 +1363,12 @@ fn addGlobalSymbol(macho: *MachO, opts: struct {
1363 symbol.nlist(macho).* = .{1363 symbol.nlist(macho).* = .{
1364 .n_strx = @backingInt(strx),1364 .n_strx = @backingInt(strx),
1365 .n_type = .{ .bits = .{1365 .n_type = .{ .bits = .{
1366 .ext = switch (opts.visibility) {1366 .ext = switch (macho.machFiletype()) {
1367 .default => true,1367 .OBJECT => true,
1368 .hidden => false,1368 .EXECUTE, .DYLIB => switch (opts.visibility) {
1369 .default => true,
1370 .hidden => false,
1371 },
1369 },1372 },
1370 .pext = switch (opts.visibility) {1373 .pext = switch (opts.visibility) {
1371 .default => false,1374 .default => false,