commit 26af3f3866100a0bd18fd2cae6e70920e6f984d3
parent 7e83e0d7e754524182a18311e4f41444b90f985a
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Fri, 11 May 2018 08:01:04 +0100
[ld/coff32] Support for short names in symbols
Coff32 supports longer names using an union with the name of the
symbol.
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/ld/coff32.c b/ld/coff32.c
@@ -102,6 +102,8 @@ static void
getsym(unsigned char *buff, SYMENT *ent)
{
int n;
+ long off, zero;
+ char *name;
n = (*unpack)(buff,
"'8lsscc",
@@ -112,6 +114,10 @@ getsym(unsigned char *buff, SYMENT *ent)
&ent->n_sclass,
&ent->n_numaux);
assert(n == SYMESZ);
+
+ name = ent->n_name;
+ if (!name[0] && !name[1] && !name[2] && !name[3])
+ (*unpack)(buff, "ll", &ent->n_zeroes, &ent->n_offset);
}
static int