summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2019-01-11 13:15:35 -0800
committerH. Peter Anvin (Intel) <hpa@zytor.com>2019-01-11 13:15:35 -0800
commit5a3b4d3802efef94b636d083fe412ab85cdab656 (patch)
tree1f08bf1302e0d5152e1204f8c13b514a35b6017e /macros
parent1df7263ae937ac11abb2c6938b8891745af91ce6 (diff)
downloadnasm-5a3b4d3802efef94b636d083fe412ab85cdab656.tar.gz
alignb: disable warnings for use in a progbits section
Allow the alignb directive to be used in either a progbits or a nobits section, by suppressing the zeroing warning. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'macros')
-rw-r--r--macros/standard.mac5
1 files changed, 4 insertions, 1 deletions
diff --git a/macros/standard.mac b/macros/standard.mac
index a6c50b68..fa543f4e 100644
--- a/macros/standard.mac
+++ b/macros/standard.mac
@@ -1,6 +1,6 @@
;; --------------------------------------------------------------------------
;;
-;; Copyright 1996-2016 The NASM Authors - All Rights Reserved
+;; Copyright 1996-2019 The NASM Authors - All Rights Reserved
;; See the file AUTHORS included with the NASM distribution for
;; the specific copyright holders.
;;
@@ -124,7 +124,10 @@ STD: nasm
%imacro alignb 1-2+.nolist
sectalign %1
%ifempty %2
+ [warning push]
+ [warning -zeroing]
resb (((%1) - (($-$$) % (%1))) % (%1))
+ [warning pop]
%else
times (((%1) - (($-$$) % (%1))) % (%1)) %2
%endif