1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-23 19:29:37 +00:00

Make the error message for large alignments more descriptive. Don't use the

real number of fill bytes for an alignment, we didn't accept anyway.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5340 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2011-12-28 16:00:16 +00:00
parent dba7806ab4
commit 5bcbb39bba

View File

@ -292,7 +292,14 @@ void SegAlign (unsigned long Alignment, int FillVal)
*/
CombinedAlignment = LeastCommonMultiple (ActiveSeg->Align, Alignment);
if (CombinedAlignment > MAX_ALIGNMENT) {
Error ("Combined alignment for active segment exceeds 0x10000");
Error ("Combined alignment for active segment is %lu which exceeds %lu",
CombinedAlignment, MAX_ALIGNMENT);
/* Avoid creating large fills for an object file that is thrown away
* later.
*/
Count = 1;
} else {
ActiveSeg->Align = CombinedAlignment;
@ -301,13 +308,13 @@ void SegAlign (unsigned long Alignment, int FillVal)
Warning (0, "Combined alignment is suspiciously large (%lu)",
CombinedAlignment);
}
/* Calculate the number of fill bytes */
Count = AlignCount (ActiveSeg->PC, Alignment) - ActiveSeg->PC;
}
/* Calculate the number of fill bytes */
Count = AlignCount (ActiveSeg->PC, Alignment) - ActiveSeg->PC;
/* Emit the data or a fill fragment */
if (FillVal != -1) {
/* User defined fill value */