0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-10-10 00:25:06 -04:00

Document Mach-O build_version directive

Signed-off-by: Fabian Giesen <fabian.giesen@epicgames.com>

Resolved Conflicts:
	doc/outfmt.src

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
Fabian Giesen
2024-10-04 13:10:05 -07:00
committed by H. Peter Anvin
parent 83655f041e
commit 912849c48c

View File

@@ -1092,6 +1092,38 @@ this extension:
Using with static linker will clear the private extern attribute.
But linker option like \c{-keep_private_externs} can avoid it.
\S{macho-bver} \c{macho} specific directive \i\c{build_version}
The directive \c{build_version} generates a \c{LC_BUILD_VERSION}
load command in the Mach-O header, which allows specifying a
target platform, minimum OS version and optionally SDK version.
Newer Xcode linker versions warn if this is not present in object
files.
This directive takes the target platform name and minimum OS
version as arguments, in this form:
\c build_version macos,10,7
Platform names that make sense for x86 code are \c{macos},
\c{iossimulator}, \c{tvossimulator} and \c{watchossimulator}.
Optionally, a trailing version number and minimum SDK version
can also be specified with this syntax:
\c build_version macos, 10, 14, 0 sdk_version 10, 14, 0
This is a macro implemented as a \c{%pragma}. It can also be
specified in its \c{%pragma} form, in which case it will not
affect non-Mach-O builds of the same source code:
\c %pragma macho build_version ...
This latter form is also useful on the command line when using
the \c{--pragma} command-line switch:
\c nasm -f macho64 --pragma "macho build_version macos,10,9" ...
\H{elffmt} \i\c{elf32}, \i\c{elf64}, \i\c{elfx32}:
\I{ELF}\I{linux, elf}Executable and Linkable Format Object Files