aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/macho.zig7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/std/macho.zig b/lib/std/macho.zig
index 9334f79dc5..aa43229a76 100644
--- a/lib/std/macho.zig
+++ b/lib/std/macho.zig
@@ -780,7 +780,7 @@ pub const section_64 = extern struct {
return parseName(&sect.segname);
}
- pub fn type_(sect: section_64) u8 {
+ pub fn @"type"(sect: section_64) u8 {
return @truncate(u8, sect.flags & 0xff);
}
@@ -793,6 +793,11 @@ pub const section_64 = extern struct {
return attr & S_ATTR_PURE_INSTRUCTIONS != 0 or attr & S_ATTR_SOME_INSTRUCTIONS != 0;
}
+ pub fn isZerofill(sect: section_64) bool {
+ const tt = sect.@"type"();
+ return tt == S_ZEROFILL or tt == S_GB_ZEROFILL or tt == S_THREAD_LOCAL_ZEROFILL;
+ }
+
pub fn isDebug(sect: section_64) bool {
return sect.attrs() & S_ATTR_DEBUG != 0;
}