Rework "overflow" error message

This commit is contained in:
ISSOtm
2019-10-13 11:50:51 +02:00
parent f1441cc962
commit 81047afb4b

View File

@@ -370,11 +370,11 @@ struct SectionPlacement *script_NextSection(void)
if (type != SECTTYPE_INVALID) { if (type != SECTTYPE_INVALID) {
if (curaddr[type][bankID] > endaddr(type) + 1) if (curaddr[type][bankID] > endaddr(type) + 1)
errx(1, "%s(%u): PC overflowed ($%x > $%x)", errx(1, "%s(%u): Sections would extend past the end of %s ($%04hx > $%04hx)",
linkerScriptName, lineNo, linkerScriptName, lineNo, typeNames[type],
curaddr[type][bankID], endaddr(type)); curaddr[type][bankID], endaddr(type));
if (curaddr[type][bankID] < startaddr[type]) if (curaddr[type][bankID] < startaddr[type])
errx(1, "%s(%u): PC underflowed ($%x < $%x)", errx(1, "%s(%u): PC underflowed ($%04hx < $%04hx)",
linkerScriptName, lineNo, linkerScriptName, lineNo,
curaddr[type][bankID], startaddr[type]); curaddr[type][bankID], startaddr[type]);
} }