shithub: rgbds

Download patch

ref: 95f347dc6a646b82d9e988bf36a011c8f01f7082
parent: 6579120d9efb986ef38eee1c85539618aa09d00a
author: ISSOtm <[email protected]>
date: Fri Mar 27 16:00:29 EDT 2020

Evaluate assertions after placing sections

--- a/include/link/object.h
+++ b/include/link/object.h
@@ -23,6 +23,11 @@
 void obj_DoSanityChecks(void);
 
 /**
+ * Evaluate all assertions
+ */
+void obj_CheckAssertions(void);
+
+/**
  * `free`s all object memory that was allocated.
  */
 void obj_Cleanup(void);
--- a/src/link/main.c
+++ b/src/link/main.c
@@ -193,6 +193,7 @@
 	/* then process them, */
 	obj_DoSanityChecks();
 	assign_AssignSections();
+	obj_CheckAssertions();
 	assign_Cleanup();
 
 	/* and finally output the result. */
--- a/src/link/object.c
+++ b/src/link/object.c
@@ -512,7 +512,10 @@
 void obj_DoSanityChecks(void)
 {
 	sect_DoSanityChecks();
+}
 
+void obj_CheckAssertions(void)
+{
 	patch_CheckAssertions(assertions);
 }