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>
This commit is contained in:
H. Peter Anvin (Intel) 2019-01-11 13:15:35 -08:00
parent 1df7263ae9
commit 5a3b4d3802

View File

@ -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