| author | |
| committer | |
| log | 210b764c03b736a6fe025b5fac030eec0350f0df |
| tree | f514d611bd432431fd1f06f84c33f62b061df33a |
| parent | a82f446d91c9e764719d34188de5d794ee24dda8 |
| signature |
See 6b6e336e07308fd23f3061b5be11407956b2a460 for context, but note that in
gABI 4.3, 3 bits are reserved for the visibility, up from the previous 2.3 files changed, 5 insertions(+), 5 deletions(-)
src/link/Elf/Object.zig+2-2| ... | ... | @@ -634,7 +634,7 @@ pub fn claimUnresolved(self: *Object, elf_file: *Elf) void { |
| 634 | 634 | |
| 635 | 635 | const is_import = blk: { |
| 636 | 636 | if (!elf_file.isEffectivelyDynLib()) break :blk false; |
| 637 | const vis = @as(elf.STV, @enumFromInt(esym.st_other)); | |
| 637 | const vis: elf.STV = @enumFromInt(@as(u3, @truncate(esym.st_other))); | |
| 638 | 638 | if (vis == .HIDDEN) break :blk false; |
| 639 | 639 | break :blk true; |
| 640 | 640 | }; |
| ... | ... | @@ -707,7 +707,7 @@ pub fn markImportsExports(self: *Object, elf_file: *Elf) void { |
| 707 | 707 | const file = sym.file(elf_file).?; |
| 708 | 708 | // https://github.com/ziglang/zig/issues/21678 |
| 709 | 709 | if (@as(u16, @bitCast(sym.version_index)) == @as(u16, @bitCast(elf.Versym.LOCAL))) continue; |
| 710 | const vis: elf.STV = @enumFromInt(sym.elfSym(elf_file).st_other); | |
| 710 | const vis: elf.STV = @enumFromInt(@as(u3, @truncate(sym.elfSym(elf_file).st_other))); | |
| 711 | 711 | if (vis == .HIDDEN) continue; |
| 712 | 712 | if (file == .shared_object and !sym.isAbs(elf_file)) { |
| 713 | 713 | sym.flags.import = true; |
src/link/Elf/SharedObject.zig+1-1| ... | ... | @@ -357,7 +357,7 @@ pub fn markImportExports(self: *SharedObject, elf_file: *Elf) void { |
| 357 | 357 | const ref = self.resolveSymbol(@intCast(i), elf_file); |
| 358 | 358 | const ref_sym = elf_file.symbol(ref) orelse continue; |
| 359 | 359 | const ref_file = ref_sym.file(elf_file).?; |
| 360 | const vis = @as(elf.STV, @enumFromInt(ref_sym.elfSym(elf_file).st_other)); | |
| 360 | const vis: elf.STV = @enumFromInt(@as(u3, @truncate(ref_sym.elfSym(elf_file).st_other))); | |
| 361 | 361 | if (ref_file != .shared_object and vis != .HIDDEN) ref_sym.flags.@"export" = true; |
| 362 | 362 | } |
| 363 | 363 | } |
src/link/Elf/ZigObject.zig+2-2| ... | ... | @@ -617,7 +617,7 @@ pub fn claimUnresolved(self: *ZigObject, elf_file: *Elf) void { |
| 617 | 617 | |
| 618 | 618 | const is_import = blk: { |
| 619 | 619 | if (!elf_file.isEffectivelyDynLib()) break :blk false; |
| 620 | const vis = @as(elf.STV, @enumFromInt(esym.st_other)); | |
| 620 | const vis: elf.STV = @enumFromInt(@as(u3, @truncate(esym.st_other))); | |
| 621 | 621 | if (vis == .HIDDEN) break :blk false; |
| 622 | 622 | break :blk true; |
| 623 | 623 | }; |
| ... | ... | @@ -695,7 +695,7 @@ pub fn markImportsExports(self: *ZigObject, elf_file: *Elf) void { |
| 695 | 695 | const file = sym.file(elf_file).?; |
| 696 | 696 | // https://github.com/ziglang/zig/issues/21678 |
| 697 | 697 | if (@as(u16, @bitCast(sym.version_index)) == @as(u16, @bitCast(elf.Versym.LOCAL))) continue; |
| 698 | const vis: elf.STV = @enumFromInt(sym.elfSym(elf_file).st_other); | |
| 698 | const vis: elf.STV = @enumFromInt(@as(u3, @truncate(sym.elfSym(elf_file).st_other))); | |
| 699 | 699 | if (vis == .HIDDEN) continue; |
| 700 | 700 | if (file == .shared_object and !sym.isAbs(elf_file)) { |
| 701 | 701 | sym.flags.import = true; |