shithub: rgbds

Download patch

ref: 0b1d01792d0b370e79fcf6c5fef2bef6161c8097
parent: 01637768cf19aedf85882b0d9f53284299239037
author: ISSOtm <eldredhabert0@gmail.com>
date: Sun Oct 11 20:04:08 EDT 2020

Indicate cur offset in linkerscript "backwards org" message

--- a/src/link/script.c
+++ b/src/link/script.c
@@ -331,8 +331,8 @@
 	}
 
 	if (arg < *pc)
-		errx(1, "%s(%" PRIu32 "): `%s` cannot be used to go backwards",
-		     linkerScriptName, lineNo, commands[command]);
+		errx(1, "%s(%" PRIu32 "): `%s` cannot be used to go backwards (currently at $%x)",
+		     linkerScriptName, lineNo, commands[command], *pc);
 	*pc = arg;
 }