mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
Allow to request BANK() of sections and PC
The bank of a section can be requested with `BANK("Section Name")`, and
the bank of the current section with `BANK(@)`. In both cases, the bank
number is resolved by the linker.
New commands have been added to the list of RPN commands of object
files, and the rest has been moved so that new additions don't force a
new change in the number of the enumerations.
Increase object file version, as it is now incompatible with the old
format.
Update manpages to reflect the new ways of using `BANK()` and the new
format of the object files.
Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
@@ -247,6 +247,20 @@ int32_t IsSectionNameInUse(const char *name)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct sSection *GetSectionByName(const char *name)
|
||||
{
|
||||
struct sSection *pSection = pSections;
|
||||
|
||||
while (pSection) {
|
||||
if (strcmp(pSection->pzName, name) == 0)
|
||||
return pSection;
|
||||
|
||||
pSection = pSection->pNext;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int32_t IsSectionSameTypeBankAndFloating(const char *name,
|
||||
enum eSectionType type, int32_t bank)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user