aboutsummaryrefslogtreecommitdiff
path: root/lib/std/macho.zig
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2021-05-17 14:28:49 +0200
committerJakub Konka <kubkon@jakubkonka.com>2021-05-18 09:28:00 +0200
commit73c015b956909d9e28392c858e7c9ecf6827e919 (patch)
treeba983eeecdd5aac80b2939dedb9cf32860d31cac /lib/std/macho.zig
parent17b25885989d5f4f0e87de69f5eb3173553de4bc (diff)
downloadzig-73c015b956909d9e28392c858e7c9ecf6827e919.tar.gz
zig-73c015b956909d9e28392c858e7c9ecf6827e919.zip
zld: parse dylib id
Diffstat (limited to 'lib/std/macho.zig')
-rw-r--r--lib/std/macho.zig32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/std/macho.zig b/lib/std/macho.zig
index 8f60d8fe94..cbbbdc1d06 100644
--- a/lib/std/macho.zig
+++ b/lib/std/macho.zig
@@ -71,6 +71,38 @@ pub const source_version_command = extern struct {
version: u64,
};
+/// The build_version_command contains the min OS version on which this
+/// binary was built to run for its platform. The list of known platforms and
+/// tool values following it.
+pub const build_version_command = extern struct {
+ /// LC_BUILD_VERSION
+ cmd: u32,
+
+ /// sizeof(struct build_version_command) plus
+ /// ntools * sizeof(struct build_version_command)
+ cmdsize: u32,
+
+ /// platform
+ platform: u32,
+
+ /// X.Y.Z is encoded in nibbles xxxx.yy.zz
+ minos: u32,
+
+ /// X.Y.Z is encoded in nibbles xxxx.yy.zz
+ sdk: u32,
+
+ /// number of tool entries following this
+ ntools: u32,
+};
+
+pub const build_tool_version = extern struct {
+ /// enum for the tool
+ tool: u32,
+
+ /// version number of the tool
+ version: u32,
+};
+
/// The entry_point_command is a replacement for thread_command.
/// It is used for main executables to specify the location (file offset)
/// of main(). If -stack_size was used at link time, the stacksize