Prohibit sections from having the same name

To make the behaviour of the linkerscript consistent, every section read
from an object file must have an unique name. This is needed as the
linkerscript uses the name of sections to place them and it expects
every section to have a different name.

This doesn't break compatibility with the old behaviour that allowed to
continue sections if they had the same name, bank number and starting
address. That's still allowed because `rgbasm` outputs a single section
if this functionality is used, it is transparent to `rgblink`.

Signed-off-by: AntonioND <antonio_nd@outlook.com>
This commit is contained in:
AntonioND
2017-04-01 15:26:44 +01:00
parent f0d4750ebc
commit 5ba8405dfa
3 changed files with 29 additions and 3 deletions

View File

@@ -35,6 +35,9 @@ extern void CreateSymbolTable(void);
extern SLONG MaxBankUsed;
extern SLONG MaxAvail[MAXBANKS];
int
IsSectionNameInUse(const char *name);
void
SetLinkerscriptName(char *tzLinkerscriptFile);