1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-28 19:29:53 +00:00

Allow to weaken globals or exports after the fact.

This commit is contained in:
James-Adam Renquinha Henri 2020-07-30 22:55:41 -04:00
parent 1c73128222
commit fb0e51bd9b

View File

@ -452,6 +452,11 @@ void SymGlobal (SymEntry* S, unsigned char AddrSize, unsigned Flags)
return;
}
/* In any case, mark the symbol as "weak", if it is not an import. This will
** allow declaring a global or an export, then "weaken" it afterwards.
*/
S->Flags |= (Flags & SF_WEAK);
/* If the symbol is already an export: If it is not defined, the address
** sizes must match.
*/