path: root/doc/nasmdoc.src
diff options
authorH. Peter Anvin <hpa@linux.intel.com>2017-03-07 23:03:11 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2017-03-07 23:03:11 -0800
commit7fcd9898f499d5944aaa2e010044f4619b65c4cf (patch)
tree141ebc71f6db37866db96f9c67075c2b4538f019 /doc/nasmdoc.src
parentfc7c5c3967c4db56134b5bfff3cbc8f38807f20e (diff)
doc: document subsections_via_symbols
Document the subsections_via_symbols directive. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'doc/nasmdoc.src')
1 files changed, 17 insertions, 2 deletions
diff --git a/doc/nasmdoc.src b/doc/nasmdoc.src
index 12cc429b..d2e9bd24 100644
--- a/doc/nasmdoc.src
+++ b/doc/nasmdoc.src
@@ -1,6 +1,6 @@
\# --------------------------------------------------------------------------
-\# Copyright 1996-2016 The NASM Authors - All Rights Reserved
+\# Copyright 1996-2017 The NASM Authors - All Rights Reserved
\# See the file AUTHORS included with the NASM distribution for
\# the specific copyright holders.
@@ -36,7 +36,7 @@
\M{title}{NASM - The Netwide Assembler}
\M{author}{The NASM Development Team}
\M{copyright_tail}{-- All Rights Reserved}
\M{license}{This document is redistributable under the license given in the file "LICENSE" distributed in the NASM archive.}
@@ -5758,6 +5758,21 @@ right-hand side of the \c{WRT} operator:
\b \c{..gotpcrel} is used to specify references to the Global Offset
Table. The GOT is supported in the \c{macho64} format only.
+\S{macho-ssvs} \c{macho} specfic directive \i\c{subsections_via_symbols}
+The directive \c{subsections_via_symbols} sets the
+\c{MH_SUBSECTIONS_VIA_SYMBOLS} flag in the Mach-O header, which tells
+the linker that the symbols in the file matches the conventions
+required to allow for link-time dead code elimination.
+This directive takes no arguments. Like most directives, it is
+wrapped in a macro; it is therefore possible to support older versions
+of NASM (without the dead code elimination support) simply by:
+\c %ifnmacro subsections_via_symbols
+\c %imacro subsections_via_symbols 0
+\c %endmacro
+\c %endif
\H{elffmt} \i\c{elf32}, \i\c{elf64}, \i\c{elfx32}: \I{ELF}\I{linux, elf}\i{Executable and Linkable
Format} Object Files