mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 10:42:07 +00:00
@@ -108,6 +108,9 @@ static struct Section *getSection(char const *pzName, enum SectionType type,
|
|||||||
yyerror("Section \"%s\"'s fixed address doesn't match its alignment",
|
yyerror("Section \"%s\"'s fixed address doesn't match its alignment",
|
||||||
pzName);
|
pzName);
|
||||||
alignment = 1; /* Ignore it if it's satisfied */
|
alignment = 1; /* Ignore it if it's satisfied */
|
||||||
|
} else if (startaddr[type] & mask) {
|
||||||
|
yyerror("Section \"%s\"'s alignment cannot be attained in %s",
|
||||||
|
pzName, typeNames[type]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -161,6 +161,13 @@ static void doSanityChecks(struct Section *section, void *ptr)
|
|||||||
if (section->isAlignFixed && section->alignMask == 1)
|
if (section->isAlignFixed && section->alignMask == 1)
|
||||||
section->isAlignFixed = false;
|
section->isAlignFixed = false;
|
||||||
|
|
||||||
|
/* Too large an alignment may not be satisfiable */
|
||||||
|
if (section->isAlignFixed
|
||||||
|
&& (section->alignMask & startaddr[section->type]))
|
||||||
|
fail("%s: %s sections cannot be aligned to $%x bytes",
|
||||||
|
section->name, typeNames[section->type],
|
||||||
|
section->alignMask + 1);
|
||||||
|
|
||||||
uint32_t minbank = bankranges[section->type][0],
|
uint32_t minbank = bankranges[section->type][0],
|
||||||
maxbank = bankranges[section->type][1];
|
maxbank = bankranges[section->type][1];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user