ref: 2c2418c44c0004a67f74c754790cfdfbb01907a7
parent: 0ba51329256a470c3c6fe7ac2b48dacd67d29c0c
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Mon Mar 12 14:06:39 EDT 2018
[nm/coff32] Add support for common blocks Common blocks use the extern hack, where the value is used to indicate the size of the block.
--- a/nm/coff32.c
+++ b/nm/coff32.c
@@ -37,7 +37,7 @@
c = 'a';
break;
case N_UNDEF:
- c = 'U';
+ c = (ent->n_value != 0) ? 'C' : 'U';
break;
default:
if (ent->n_scnum > nsect)
@@ -136,6 +136,7 @@
sym->name = getsname(fname, fp, ent);
sym->type = typeof(ent);
sym->value = ent->n_value;
+ sym->size = (sym->type == 'C') ? ent->n_value : 0;
}
static void