diff options
author | H. Peter Anvin <hpa@zytor.com> | 2016-03-07 21:51:57 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2016-03-07 22:06:16 -0800 |
commit | bc42cbe36348aca4c33210fa8322bd451e36ef6c (patch) | |
tree | c2034394ad2ad7d5a9d06f76b2b69b67e00b61ad /output/codeview.c | |
parent | 3def9fcb59fde13cc61184df3eaf49cfed8f6e2c (diff) | |
download | nasm-bc42cbe36348aca4c33210fa8322bd451e36ef6c.tar.gz |
codeview: remove hack for handling local labels
Now when labels are properly concatenated in common code, there is no
reason for the debugging backend to need to be aware of local
symbols. We don't have to consider ..[^@] special symbols either, as
they are now filtered in labels.c.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Debugged-by: Jim Kukunas <james.t.kukunas@linux.intel.com>
Diffstat (limited to 'output/codeview.c')
-rw-r--r-- | output/codeview.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/output/codeview.c b/output/codeview.c index b5c205ce..f9750bfc 100644 --- a/output/codeview.c +++ b/output/codeview.c @@ -188,8 +188,6 @@ static void cv8_linenum(const char *filename, int32_t linenumber, static void cv8_deflabel(char *name, int32_t segment, int64_t offset, int is_global, char *special) { - int ret; - size_t len; struct cv8_symbol *sym; struct coff_Section *s; @@ -214,21 +212,8 @@ static void cv8_deflabel(char *name, int32_t segment, int64_t offset, sym->size = 0; sym->typeindex = 0; - /* handle local labels */ - if (name[0] == '.' && cv8_state.last_sym != NULL) { - len = strlen(cv8_state.last_sym->name) + strlen(name); - sym->name = nasm_malloc(len + 1); - ret = snprintf(sym->name, len + 1, "%s%s", - cv8_state.last_sym->name, name); - nasm_assert(ret > 0 && (size_t)ret == len); - } else { - len = strlen(name); - sym->name = nasm_malloc(len + 1); - ret = snprintf(sym->name, len + 1, "%s", name); - nasm_assert(ret > 0 && (size_t)ret == len); - } - - cv8_state.symbol_lengths += len + 1; + sym->name = nasm_strdup(name); + cv8_state.symbol_lengths += strlen(sym->name) + 1; if (cv8_state.last_sym && cv8_state.last_sym->section == segment) cv8_state.last_sym->size = offset - cv8_state.last_sym->secrel; |