diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2010-04-20 15:33:45 +0400 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2010-04-21 01:07:47 +0400 |
commit | d5f2aef30abcba734c51abdadf3255a6f4bd5be9 (patch) | |
tree | c56e16283f5c979b47174d9ba5b7fc76d02224e8 /nasm.c | |
parent | d7a64b72a2ca9c0a399545279f96a5b7e39b8b6d (diff) | |
download | nasm-d5f2aef30abcba734c51abdadf3255a6f4bd5be9.tar.gz nasm-d5f2aef30abcba734c51abdadf3255a6f4bd5be9.tar.bz2 nasm-d5f2aef30abcba734c51abdadf3255a6f4bd5be9.zip |
Introduce SEGALIGN directive
No real handling yet though. Definition only.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'nasm.c')
-rw-r--r-- | nasm.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -1232,7 +1232,19 @@ static void assemble_file(char *fname, StrList **depend_ptr) 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) { |