aboutsummaryrefslogtreecommitdiffstats
path: root/doc/nasmdoc.src
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2017-03-28 15:34:30 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2017-03-28 15:36:26 -0700
commit002532d32329e359d33653af328f29aecd573d7d (patch)
tree23a100223ccbb3f809de7e6058779ae170144045 /doc/nasmdoc.src
parent495b6352d871381c21d65a403124658f3d34dd35 (diff)
downloadnasm-002532d32329e359d33653af328f29aecd573d7d.tar.gz
nasm-002532d32329e359d33653af328f29aecd573d7d.tar.xz
nasm-002532d32329e359d33653af328f29aecd573d7d.zip
Document new Mach-O flags
Add documentation for recent Mach-O enhancements. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'doc/nasmdoc.src')
-rw-r--r--doc/nasmdoc.src34
1 files changed, 27 insertions, 7 deletions
diff --git a/doc/nasmdoc.src b/doc/nasmdoc.src
index 0df4911f..2d84b64e 100644
--- a/doc/nasmdoc.src
+++ b/doc/nasmdoc.src
@@ -5763,6 +5763,14 @@ comma. The following flags can also be specified:
\b \c{bss} - this section is uninitialized and filled with zero
+\b \c{zerofill} - same as \c{bss}
+
+\b \c{no_dead_strip} - inhibit dead code stripping for this section
+
+\b \c{live_support} - set the live support flag for this section
+
+\b \c{strip_static_syms} - strip static symbols for this section
+
\b \c{align=}\e{alignment} - specify section alignment
The default is \c{data}, unless the section name is \c{__text} or
@@ -5800,14 +5808,26 @@ The directive \c{subsections_via_symbols} sets the
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:
+This directive takes no arguments.
+
+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 subsections_via_symbols
+
+\S{macho-ssvs} \c{macho} specfic directive \i\c{no_dead_strip}
+
+The directive \c{no_dead_strip} sets the Mach-O \c{SH_NO_DEAD_STRIP}
+section flag on the section containing a a specific symbol. This
+directive takes a list of symbols as its arguments.
+
+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 no_dead_strip symbol...
-\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