summaryrefslogtreecommitdiff
path: root/nasm.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2002-04-30 20:58:18 +0000
committerH. Peter Anvin <hpa@zytor.com>2002-04-30 20:58:18 +0000
commit41bf8002b2fa402bd344a290fcc9f65de328859c (patch)
treefa1638dfbf73e3a6b96ce99cda1cd5ad9c1adf61 /nasm.c
parentef7468f4ec05f23e8d866493593d7c1f07df5e03 (diff)
downloadnasm-41bf8002b2fa402bd344a290fcc9f65de328859c.tar.gz
nasm-41bf8002b2fa402bd344a290fcc9f65de328859c.tar.bz2
nasm-41bf8002b2fa402bd344a290fcc9f65de328859c.zip
NASM 0.98
Diffstat (limited to 'nasm.c')
-rw-r--r--nasm.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/nasm.c b/nasm.c
index 74fcc08..3c5327a 100644
--- a/nasm.c
+++ b/nasm.c
@@ -326,7 +326,8 @@ static int process_arg (char *p, char *q)
case '-': /* -- => stop processing options */
stopoptions = 1;
break;
- case 's': /* silently ignored for compatibility */
+ case 's':
+ error_file = stdout;
break;
case 'o': /* these parameters take values */
case 'f':
@@ -390,7 +391,8 @@ static int process_arg (char *p, char *q)
" -e preprocess only (writes output to stdout by default)\n"
" -a don't preprocess (assemble only)\n"
" -M generate Makefile dependencies on stdout\n\n"
- " -E<file> redirect error messages to file\n\n"
+ " -E<file> redirect error messages to file\n"
+ " -s redirect error messages to stdout\n\n"
" -g enable debug info\n"
" -F format select a debugging format\n\n"
" -I<path> adds a pathname to the include file path\n"
@@ -812,18 +814,6 @@ static void assemble_file (char *fname)
report_error (ERR_NONFATAL,
"EQU not preceded by label");
- /*
- * EQU cannot be used to declare a label relative to
- * an external symbol.
- */
- else if ((output_ins.oprs[0].opflags & OPFLAG_EXTERN)
- || (output_ins.operands > 1
- && (output_ins.oprs[1].opflags & OPFLAG_EXTERN)))
- {
- report_error (ERR_NONFATAL,
- "EQU used relative to external symbol");
- }
-
else if (output_ins.label[0] != '.' ||
output_ins.label[1] != '.' ||
output_ins.label[2] == '@')
@@ -832,10 +822,11 @@ static void assemble_file (char *fname)
(output_ins.oprs[0].type & IMMEDIATE) &&
output_ins.oprs[0].wrt == NO_SEG)
{
- define_label (output_ins.label,
- output_ins.oprs[0].segment,
- output_ins.oprs[0].offset,
- NULL, FALSE, FALSE, ofmt, report_error);
+ int isext = output_ins.oprs[0].opflags & OPFLAG_EXTERN;
+ define_label (output_ins.label,
+ output_ins.oprs[0].segment,
+ output_ins.oprs[0].offset,
+ NULL, FALSE, isext, ofmt, report_error);
}
else if (output_ins.operands == 2 &&
(output_ins.oprs[0].type & IMMEDIATE) &&