From: Alan Cox Date: Sun, 29 Oct 2017 16:35:38 +0000 (+0000) Subject: nm: understand the fact a U symbol may be segment constrained X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=e6334562213218bcb726498394dad2032f36d1bb;p=FUZIX.git nm: understand the fact a U symbol may be segment constrained --- diff --git a/Applications/MWC/cmd/asz80/nm.c b/Applications/MWC/cmd/asz80/nm.c index c96be538..c9adf51a 100644 --- a/Applications/MWC/cmd/asz80/nm.c +++ b/Applications/MWC/cmd/asz80/nm.c @@ -9,6 +9,7 @@ #include #include #include +#include #include "obj.h" @@ -18,7 +19,7 @@ static int show_debug = 1; static int show_name; static int show_undef; -static char segname[] = "ATDB????????????"; +static char segname[] = "ATDB???????????U"; static int do_nm(FILE *fp, const char *name) { @@ -61,14 +62,15 @@ static int do_nm(FILE *fp, const char *name) addr = fgetc(fp); addr |= fgetc(fp) << 8; base += 2; + c = segname[type & S_SEGMENT]; if (!(type & S_UNKNOWN)) { - c = segname[type & S_SEGMENT]; /* Showing undefined only */ if (show_undef) continue; } else { + if (c != 'U') + c = tolower(c); addr = 0; - c = 'U'; } printf("%04X %c %s\n", addr, c, symname); }