summaryrefslogtreecommitdiff
path: root/output
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2018-12-13 21:53:31 -0800
committerH. Peter Anvin (Intel) <hpa@zytor.com>2018-12-13 21:53:31 -0800
commit723ab481a6550454a6f834bb854e751744ca340a (patch)
treecb217692a76d3dcab83c7ad922e3adca9006dccd /output
parent6bde2ed8806b3e53657d46b61ee79d7afe5c2e13 (diff)
downloadnasm-723ab481a6550454a6f834bb854e751744ca340a.tar.gz
warnings: define warning classes at point of usemkwarnings
It is extremely desirable to allow the user fine-grained control of warnings, but this has been complicated by the fact that a warning class has had to be defined in no less than three places (error.h, error.c, nasmdoc.src) before it can be used in source code. Instead, use a script to define these via magic comments at the point of use. This hopefully will encourage creating new classes as needed. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'output')
-rw-r--r--output/outelf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/output/outelf.c b/output/outelf.c
index 8270ba0b..2adf4692 100644
--- a/output/outelf.c
+++ b/output/outelf.c
@@ -919,6 +919,11 @@ static void elf32_out(int32_t segto, const void *data,
}
if (gnu16) {
+ /*!
+ *!gnu-elf-extensions [off] using 8- or 16-bit relocation in ELF32, a GNU extension
+ *! warns if 8-bit or 16-bit relocations are used in the \c{elf32} output format.
+ *! The GNU extensions allow this.
+ */
nasm_warnf(WARN_GNU_ELF_EXTENSIONS, "8- or 16-bit relocations "
"in ELF32 is a GNU extension");
} else if (asize != 4 && segment != NO_SEG) {