shithub: rgbds

Download patch

ref: 81047afb4bf5e73b7f9a388268124241e06b24bd
parent: f1441cc962dc5602f2ed600dc7fb6cfa2caaf337
author: ISSOtm <eldredhabert0@gmail.com>
date: Sun Oct 13 07:50:51 EDT 2019

Rework "overflow" error message

--- a/src/link/script.c
+++ b/src/link/script.c
@@ -370,11 +370,11 @@
 
 		if (type != SECTTYPE_INVALID) {
 			if (curaddr[type][bankID] > endaddr(type) + 1)
-				errx(1, "%s(%u): PC overflowed ($%x > $%x)",
-				     linkerScriptName, lineNo,
+				errx(1, "%s(%u): Sections would extend past the end of %s ($%04hx > $%04hx)",
+				     linkerScriptName, lineNo, typeNames[type],
 				     curaddr[type][bankID], endaddr(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,
 				     curaddr[type][bankID], startaddr[type]);
 		}