summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2018-12-30 07:54:48 -0800
committerH. Peter Anvin <hpa@zytor.com>2018-12-30 07:54:48 -0800
commit88477764f37a8462c7c01f2b235ef4efd08c765f (patch)
tree620ce28ac140331c6a3f6e7c4bb92400a8a080db /doc
parent81f98fe79be23174e2d6ddd9f17a5cfb9ca71ec7 (diff)
downloadnasm-88477764f37a8462c7c01f2b235ef4efd08c765f.tar.gz
ELF: add support for the ELF "merge" attribute
Add support for the "merge" attribute in ELF, along with the associated "strings" and size specifier attributes. Fix a few places where we used "int", but a larger type really ought to have been used. Be a bit more lax about respecifying attributes. For example, align= can be respecified; the highest resulting value is used. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/changes.src3
-rw-r--r--doc/nasmdoc.src25
2 files changed, 27 insertions, 1 deletions
diff --git a/doc/changes.src b/doc/changes.src
index a4df0473..6fd19943 100644
--- a/doc/changes.src
+++ b/doc/changes.src
@@ -12,6 +12,9 @@ since 2007.
\b Suppress nuisance "\c{label changed during code generation}" messages
after a real error.
+\b Add support for the \c{merge} and \c{strings} attributes on ELF
+sections. See \k{elfsect}.
+
\S{cl-2.14.02} Version 2.14.02
\b Fix crash due to multiple errors or warnings during the code
diff --git a/doc/nasmdoc.src b/doc/nasmdoc.src
index ea6f10f2..bcfcad90 100644
--- a/doc/nasmdoc.src
+++ b/doc/nasmdoc.src
@@ -256,9 +256,12 @@ Object File Format
\IA{sectalign}{sectalign}
\IR{solaris x86} Solaris x86
\IA{standard section names}{standardized section names}
+\IR{strings, elf attribute} \c{strings}
\IR{symbols, exporting from dlls} symbols, exporting from DLLs
\IR{symbols, importing from dlls} symbols, importing from DLLs
\IR{test subdirectory} \c{test} subdirectory
+\IR{thread local storage in elf} thread local storage, in \c{elf}
+\IR{thread local storage in mach-o} thread local storage, in \c{macho}
\IR{tlink} \c{TLINK}
\IR{underscore, in c symbols} underscore, in C symbols
\IR{unicode} Unicode
@@ -5951,6 +5954,26 @@ contents given, such as a BSS section.
\I{section alignment, in elf}\I{alignment, in elf sections}alignment
requirements of the section.
+\b \c{ent=} or \c{entsize=} specifies the fundamental data item size
+for a section which contains either fixed-sized data structures or
+strings; this is generally used with the \c{merge} attribute (see
+below.)
+
+\b \c{byte}, \c{word}, \c{dword}, \c{qword}, \c{tword}, \c{oword},
+\c{yword}, or \c{zword} are both shorthand for \c{entsize=}, but also
+sets the default alignment.
+
+\b \i{strings, ELF attribute}\c{strings} indicate that this section
+contains exclusively null-terminated strings. By default these are
+assumed to be byte strings, but a size specifier can be used to
+override that.
+
+\b \i\c{merge} indicates that duplicate data elements in this section
+should be merged with data elements from other object files. Data
+elements can be either fixed-sized objects or null-terminatedstrings
+(with the \c{strings} attribute.) A size specifier is required unless
+\c{strings} is specified, in which case the size defaults to \c{byte}.
+
\b \i\c{tls} defines the section to be one which contains
thread local variables.
@@ -8213,7 +8236,7 @@ then the correct first instruction in the code section will not be
seen because the starting point skipped over it. This isn't really
ideal.
-To avoid this, you can specify a `\i\c{synchronisation}' point, or indeed
+To avoid this, you can specify a `\i{synchronisation}' point, or indeed
as many synchronisation points as you like (although NDISASM can
only handle 2147483647 sync points internally). The definition of a sync
point is this: NDISASM guarantees to hit sync points exactly during