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 /macros | |
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 'macros')
-rw-r--r-- | macros/standard.mac | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/macros/standard.mac b/macros/standard.mac index f6ca65d2..a2ab4fc1 100644 --- a/macros/standard.mac +++ b/macros/standard.mac @@ -166,6 +166,13 @@ STD: nasm %endrep %endmacro +%imacro required 1-*.nolist + %rep %0 + [required %1] + %rotate 1 + %endrep +%endmacro + %imacro common 1-*.nolist %rep %0 [common %1] |