mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Add -E option to rgbds, allows exporting all labels by default
This commit is contained in:
@@ -21,6 +21,7 @@ char *currentmacroargs[MAXMACROARGS + 1];
|
||||
char *newmacroargs[MAXMACROARGS + 1];
|
||||
char SavedTIME[256];
|
||||
char SavedDATE[256];
|
||||
bool exportall;
|
||||
|
||||
SLONG
|
||||
Callback_NARG(struct sSymbol * sym)
|
||||
@@ -575,6 +576,9 @@ sym_AddLocalReloc(char *tzSym)
|
||||
nsym->nValue = nPC;
|
||||
nsym->nType |=
|
||||
SYMF_RELOC | SYMF_LOCAL | SYMF_DEFINED;
|
||||
if (exportall) {
|
||||
nsym->nType |= SYMF_EXPORT;
|
||||
}
|
||||
nsym->pScope = pScope;
|
||||
nsym->pSection = pCurrentSection;
|
||||
}
|
||||
@@ -604,6 +608,9 @@ sym_AddReloc(char *tzSym)
|
||||
if (nsym) {
|
||||
nsym->nValue = nPC;
|
||||
nsym->nType |= SYMF_RELOC | SYMF_DEFINED;
|
||||
if (exportall) {
|
||||
nsym->nType |= SYMF_EXPORT;
|
||||
}
|
||||
nsym->pScope = NULL;
|
||||
nsym->pSection = pCurrentSection;
|
||||
}
|
||||
@@ -709,6 +716,13 @@ sym_AddMacro(char *tzSym)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Set whether to export all relocable symbols by default
|
||||
*/
|
||||
void sym_SetExportAll(BBOOL set) {
|
||||
exportall = set;
|
||||
}
|
||||
|
||||
/*
|
||||
* Prepare for pass #1
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user