Check for unsatisfiable alignment constraints

Fixes #493
This commit is contained in:
ISSOtm
2020-03-22 11:54:57 +01:00
parent 062fa5392b
commit df2c0dc2f9
2 changed files with 10 additions and 0 deletions

View File

@@ -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",
pzName);
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]);
}
}