diff options
author | H. Peter Anvin <hpa@zytor.com> | 2019-09-12 20:21:03 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2019-09-12 20:21:03 -0400 |
commit | 90b1ccff86d530b140eb391ede3c50e33bcf9410 (patch) | |
tree | 1ef248693a5d5b8c226a99f2626734f4f76f88c5 /output/outmacho.c | |
parent | 495fda63418600229f36a3a7de62b75620be34b6 (diff) | |
download | nasm-90b1ccff86d530b140eb391ede3c50e33bcf9410.tar.gz |
Drop unnecessary EXTERN symbols
Currently, NASM always issues as an unknown symbol any symbol declared
EXTERN. This is highly undesirable when using common header files,
as it might cause the linker to pull in a bunch of unnecessary
modules, depending on how smart the linker is.
Add a new REQUIRED directive which behaves like the old EXTERN, for
the use cases which might still need this behavior.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'output/outmacho.c')
-rw-r--r-- | output/outmacho.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/output/outmacho.c b/output/outmacho.c index 5ad6601d..6cbaa012 100644 --- a/output/outmacho.c +++ b/output/outmacho.c @@ -1740,7 +1740,7 @@ static bool macho_set_section_attribute_by_symbol(const char *label, uint32_t fl int32_t nasm_seg; int64_t offset; - if (!lookup_label(label, &nasm_seg, &offset)) { + if (lookup_label(label, &nasm_seg, &offset) == LBL_NONE) { nasm_error(ERR_NONFATAL, "unknown symbol `%s' in no_dead_strip", label); return false; } |