diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2016-02-17 20:33:40 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2016-02-17 20:33:40 -0800 |
commit | b2bfb580dfac3f793abd83f79df8312902811b49 (patch) | |
tree | 8830ba2c60135180510d0c149af3445daebdb41a | |
parent | 130736c0cfcad28ee16cec6c14bb22999d982e5a (diff) | |
parent | 11b8817e8a481f7f89160c4ac88bf380a8770fcf (diff) | |
download | nasm-b2bfb580dfac3f793abd83f79df8312902811b49.tar.gz |
Merge branch 'master' into elfmerge
-rw-r--r-- | doc/changes.src | 3 | ||||
-rw-r--r-- | listing.c | 12 |
2 files changed, 9 insertions, 6 deletions
diff --git a/doc/changes.src b/doc/changes.src index 67491b71..eab8439d 100644 --- a/doc/changes.src +++ b/doc/changes.src @@ -32,6 +32,9 @@ since 2007. relocations are zero-extended from 32-bits with a warning (suppressible via \c{}); signed 64-bit relocations are an arror. +\b Line numbers in list files now correspond to the lines in the source + files, instead of simply being sequential. + \S{cl-2.11.09} Version 2.11.09 \b Fix potential stack overwrite in \c{macho32} backend. @@ -89,7 +89,7 @@ static void list_emit(void) if (!listlinep && !listdata[0]) return; - fprintf(listfp, "%6"PRId32" ", ++listlineno); + fprintf(listfp, "%6"PRId32" ", listlineno); if (listdata[0]) fprintf(listfp, "%08"PRIX32" %-*s", listoffset, LIST_HEXBIT + 1, @@ -111,7 +111,7 @@ static void list_emit(void) listdata[0] = '\0'; if (listerror[0]) { - fprintf(listfp, "%6"PRId32" ", ++listlineno); + fprintf(listfp, "%6"PRId32" ", listlineno); for (i = 0; i < LIST_HEXBIT; i++) putc('*', listfp); @@ -248,10 +248,9 @@ static void list_line(int type, char *line) { if (!listp) return; - if (user_nolist) { /* fbk - 9/2/00 */ - listlineno++; - return; - } + + if (user_nolist) + return; if (mistack && mistack->inhibiting) { if (type == LIST_MACRO) @@ -263,6 +262,7 @@ static void list_line(int type, char *line) } } list_emit(); + listlineno = src_get_linnum(); listlinep = true; strncpy(listline, line, LIST_MAX_LEN - 1); listline[LIST_MAX_LEN - 1] = '\0'; |