X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=symbol.c;h=87f90c048d80952a5a0cb18aec48035ae5905c36;hp=6700f149968511a9a707660f03a9ab01ff4241af;hb=66b362fa203d0850e8dce8045adb454e354c22ce;hpb=03dd34951a331e0b8971195ccef1600fffaea2e6 diff --git a/symbol.c b/symbol.c index 6700f14..87f90c0 100644 --- a/symbol.c +++ b/symbol.c @@ -1,7 +1,7 @@ // // RMAC - Reboot's Macro Assembler for all Atari computers // SYMBOL.C - Symbol Handling -// Copyright (C) 199x Landon Dyer, 2011-2017 Reboot and Friends +// Copyright (C) 199x Landon Dyer, 2011-2018 Reboot and Friends // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986 // Source utilised with the kind permission of Landon Dyer // @@ -260,22 +260,6 @@ uint32_t sy_assign(uint8_t * buf, uint8_t *(* construct)()) } } - // For ELF object mode run through all symbols in reference order - // and export all global-referenced labels. Not sure if this is - // required but it's here nonetheless -/* why?? when you have sy_assign_ELF ??? - if (obj_format == ELF) - { - for(sy=sdecl; sy!=NULL; sy=sy->sorder) - { - if ((sy->sattr == (GLOBAL | REFERENCED)) && (buf != NULL)) - { - buf = (*construct)(buf, sy, 0); - scount++; - } - } - }*/ - return scount; } @@ -305,27 +289,12 @@ uint32_t sy_assign_ELF(uint8_t * buf, uint8_t *(* construct)()) // them. We also pick which symbols should be global or not here. for(SYM * sy=sdecl; sy!=NULL; sy=sy->sdecl) { - // Export or import external references, and export COMMON blocks. - //if ((sy->stype == LABEL) - // && ((sy->sattr & (GLOBAL | DEFINED)) == (GLOBAL | DEFINED) - // || (sy->sattr & (GLOBAL | REFERENCED)) == (GLOBAL | REFERENCED)) - // || (sy->sattr & COMMON)) - //{ - // sy->senv = (WORD)scount++; - // - // if (buf != NULL) - // buf = (*construct)(buf, sy, 1); - //} // Export vanilla labels (but don't make them global). An exception is // made for equates, which are not exported unless they are referenced. if (sy->stype == LABEL && lsym_flag && (sy->sattr & (DEFINED | REFERENCED)) != 0 && (*sy->sname != '.') && (sy->sattr & GLOBAL) == 0) - //if (sy->stype == 0) - // if (lsym_flag) - // if ((sy->sattr & (DEFINED | REFERENCED)) != 0) - // if ((!as68_flag || *sy->sname != 'L')) { sy->senv = scount++; @@ -340,7 +309,6 @@ uint32_t sy_assign_ELF(uint8_t * buf, uint8_t *(* construct)()) // and export all global-referenced labels. Not sure if this is // required but it's here nonetheless - //for(sy=sdecl; sy!=NULL; sy=sy->sorder) for(SYM * sy=sdecl; sy!=NULL; sy=sy->sdecl) { if ((sy->stype == LABEL) @@ -513,7 +481,7 @@ int symtable(void) strcpy(ln2, "external"); else { - sprintf(ln2, "%08X", q->svalue); + sprintf(ln2, "%016lX", q->svalue); ToUppercase(ln2); }