shithub: rgbds

Download patch

ref: 18c47843f1c4ed3e9c480559bccf5f8a059ddd97
parent: d5fe377c114c66bac141c1e05918eb0d169a5012
author: ISSOtm <[email protected]>
date: Wed Feb 12 10:27:07 EST 2020

Check if sections referenced in linker script exist

--- a/src/link/script.c
+++ b/src/link/script.c
@@ -419,6 +419,10 @@
 
 				section.section =
 					sect_GetSection(token->attr.string);
+				if (!section.section)
+					errx(1, "%s(%u): Unknown section \"%s\"",
+					     linkerScriptName, lineNo,
+					     token->attr.string);
 				section.org = curaddr[type][bankID];
 				section.bank = bank;