No real handling yet though. Definition only.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
section
segment
warning
+segalign
; --- Format-specific directives
export ; outcoff, outobj
location.segment = seg;
}
break;
- case D_EXTERN: /* [EXTERN label:special] */
+ case D_SEGALIGN: /* [SEGALIGN n] */
+ {
+ if (*value) {
+ int align = atoi(value);
+ if (!is_power2(align)) {
+ nasm_error(ERR_NONFATAL,
+ "segment alignment `%s' is not power of two",
+ value);
+ }
+ }
+ }
+ break;
+ case D_EXTERN: /* [EXTERN label:special] */
if (*value == '$')
value++; /* skip initial $ if present */
if (pass0 == 2) {
%define __SECT__ [segment %1]
__SECT__
%endmacro
+%imacro segalign 1+.nolist
+%define __SECT__ [segalign %1]
+ __SECT__
+%endmacro
%imacro absolute 1+.nolist
%define __SECT__ [absolute %1]