scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 8540c69e9d7340ab9e702c57652f81f3d883694b
parent 4ff9bb1a22a0fd98f31e4cd118e19456cbc3efdd
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue, 29 May 2018 18:34:00 +0100

[as/coff32] Add support for aux symbol entries

These aux enries are used to extend the information contained
in the symbols. We don't care about them and it means that we can
get rid of them without problems.

Diffstat:
Mld/coff32.c | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/ld/coff32.c b/ld/coff32.c @@ -239,7 +239,7 @@ static int readsyms(Obj *obj, long off) { int type; - unsigned i; + unsigned i, n, aux; FILHDR *hdr = obj->filhdr;; if (fseek(obj->fp, off, SEEK_SET) == EOF) @@ -256,6 +256,7 @@ readsyms(Obj *obj, long off) outmem(); hdr = obj->filhdr; + aux = n = 0; for (i = 0; i < hdr->f_nsyms; i++) { Symbol *sym; TUINT value; @@ -265,7 +266,12 @@ readsyms(Obj *obj, long off) if (fread(buff, SYMESZ, 1, obj->fp) != 1) return -1; + if (aux > 0) { + aux--; + continue; + } getsym(obj, buff, &ent); + aux = ent.n_numaux; name = symname(obj, &ent); type = typeof(obj, &ent); sym = lookup(name);