doc: Explain SECTALIGN
authorCyrill Gorcunov <gorcunov@gmail.com>
Wed, 28 Jul 2010 13:59:49 +0000 (17:59 +0400)
committerCyrill Gorcunov <gorcunov@gmail.com>
Wed, 28 Jul 2010 13:59:49 +0000 (17:59 +0400)
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
doc/changes.src
doc/nasmdoc.src

index 75c355b..a7ee231 100644 (file)
@@ -37,7 +37,7 @@ since 2007.
 \b An alignment more then 64 bytes are allowed for \c{win32},
   \c{win64} output formats.
 
-\b \c{SECTALIGN} directive introduced. In most cases invisible to user.
+\b \c{SECTALIGN} directive introduced. See \k{sectalign}.
 
 \b \c{nojmp} option introduced in \c{smartalign} package. See
   \k{pkg_smartalign}.
index 8517bf4..41055e9 100644 (file)
@@ -239,6 +239,7 @@ Object File Format
 \IA{sib}{sib byte}
 \IR{sib byte} SIB byte
 \IR{align, smart} \c{ALIGN}, smart
+\IA{sectalign}{sectalign}
 \IR{solaris x86} Solaris x86
 \IA{standard section names}{standardized section names}
 \IR{symbols, exporting from dlls} symbols, exporting from DLLs
@@ -4098,6 +4099,25 @@ the use of \c{ALIGN} or \c{ALIGNB}.
 See also the \c{smartalign} standard macro package, \k{pkg_smartalign}.
 
 
+\S{sectalign} \i\c{SECTALIGN}: Section Alignment
+
+The \c{SECTALIGN} macros provides a way to modify alignment attribute
+of output file section. Unlike the \c{align=} attribute allowed at section
+definition only the \c{SECTALIGN} macro may be used any time you need it.
+
+For example the statement
+
+\c
+\c SECTALIGN 16
+\c
+
+sets a section alignment requirement to 16 bytes. Note that once increased
+the section alignment can not be decreased, the magnitude can grow only.
+
+It must be also noted that \c{SECTALIGN} gets called implicitly inside \c{ALIGN}
+handler and as result \c{ALIGN} may update section alignment.
+
+
 \C{macropkg} \i{Standard Macro Packages}
 
 The \i\c{%use} directive (see \k{use}) includes one of the standard