We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 24590c1 commit c455e4eCopy full SHA for c455e4e
n64.ld
@@ -189,3 +189,9 @@ SECTIONS {
189
/* Deprecated */
190
end = .;
191
}
192
+
193
+/* Give an assert for a too huge binary. The maximum allowed size here is 8 MiB,
194
+ minus the space for the stack and the initial low memory section.
195
+ Notice the exact size doesn't matter much: we want to detect mistakes that
196
+ would be much harder to find at runtime when no heap is available... */
197
+ASSERT(end - __text_start <= 8*1024*1024 - 64*1024 - 1024, "ERROR: the generated ELF is too big for N64 memory")
0 commit comments