diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2017-09-27 15:29:01 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2017-09-27 15:29:01 -0700 |
commit | e38654a24ed7ea91c1c199c21b52c4132cbe8d0e (patch) | |
tree | ff1501c778066e949b6e7ebffbf763cecf5007f9 /macros | |
parent | 94ead27971de001aea5b403130b2a94cf152ebd4 (diff) | |
download | nasm-e38654a24ed7ea91c1c199c21b52c4132cbe8d0e.tar.gz |
BR 3392411: smartalign: make sure we always define the end symbol
We need to always define the end symbol, otherwise we might find
ourselves in a situation where the alignment code grows (common!) and
then the symbol is defined late.
Reported-by: ig <glucksmann@avast.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'macros')
-rw-r--r-- | macros/smartalign.mac | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/macros/smartalign.mac b/macros/smartalign.mac index e5c0b99a..0f81ae87 100644 --- a/macros/smartalign.mac +++ b/macros/smartalign.mac @@ -1,6 +1,6 @@ ;; -------------------------------------------------------------------------- ;; -;; Copyright 1996-2016 The NASM Authors - All Rights Reserved +;; Copyright 1996-2017 The NASM Authors - All Rights Reserved ;; See the file AUTHORS included with the NASM distribution for ;; the specific copyright holders. ;; @@ -173,7 +173,6 @@ USE: smartalign jmp %$end ; We can't re-use %$pad here as $ will have changed! times (((%1) - (($-$$) % (%1))) % (%1)) nop -%$end: %else times (%$pad / __ALIGN_%[__BITS__]BIT_GROUP__) \ db __ALIGN_%[__BITS__]BIT_%[__ALIGN_%[__BITS__]BIT_GROUP__]B__ @@ -182,6 +181,7 @@ USE: smartalign db __ALIGN_%[__BITS__]BIT_%[%$pad]B__ %endif %endif +%$end: %pop %endif %endmacro |