std.Build.Step.CheckObject: Truncate st_other before interpreting it
Tools are free to use the upper bits of this field for whatever; thus, tools that want to interpret the visibility type should truncate to 2 bits.
This commit is contained in:
@@ -2270,7 +2270,7 @@ const ElfDumper = struct {
|
||||
try writer.print(" {s}", .{sym_bind});
|
||||
}
|
||||
|
||||
const sym_vis = @as(elf.STV, @enumFromInt(sym.st_other));
|
||||
const sym_vis = @as(elf.STV, @enumFromInt(@as(u2, @truncate(sym.st_other))));
|
||||
try writer.print(" {s}", .{@tagName(sym_vis)});
|
||||
|
||||
const sym_name = switch (sym.st_type()) {
|
||||
|
||||
Reference in New Issue
Block a user