mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-24 03:52:08 +00:00
Allow local symbols to be referenced
Local symbols can now be referenced outside the scope of their parent, by using the syntax “Parent.Chlid”. - Local symbol names are now stored internally as “Parent.Child”. - The symbol’s scope field no longer forms a linked list of the prior local symbols; it will now always contain the parent. - Add the ability use EXPORT and GLOBAL with local symbols. - Reduce duplication between findsymbol() and findpsymbol(), as well as between sym_AddLocalReloc() and sym_AddReloc().
This commit is contained in:
@@ -260,11 +260,7 @@ writesymbol(struct sSymbol * pSym, FILE * f)
|
||||
sectid = -1;
|
||||
type = SYM_IMPORT;
|
||||
} else {
|
||||
if (pSym->nType & SYMF_LOCAL) {
|
||||
strcpy(symname, pSym->pScope->tzName);
|
||||
strcat(symname, pSym->tzName);
|
||||
} else
|
||||
strcpy(symname, pSym->tzName);
|
||||
strcpy(symname, pSym->tzName);
|
||||
|
||||
if (pSym->nType & SYMF_EXPORT) {
|
||||
/* Symbol should be exported */
|
||||
|
||||
Reference in New Issue
Block a user