mirror of
https://github.com/gbdev/rgbds.git
synced 2026-09-20 04:37:05 +00:00
Fix to actually allow one-past-the-end zero-sized sections in linker scripts
This commit is contained in:
+1
-1
@@ -92,7 +92,7 @@ void layout_SetAddr(uint32_t addr) {
|
|||||||
|
|
||||||
if (uint16_t &pc = curAddr[activeType][activeBankIdx]; addr < pc) {
|
if (uint16_t &pc = curAddr[activeType][activeBankIdx]; addr < pc) {
|
||||||
scriptError("Cannot decrease the current address (from $%04x to $%04x)", pc, addr);
|
scriptError("Cannot decrease the current address (from $%04x to $%04x)", pc, addr);
|
||||||
} else if (addr > typeInfo.endAddr()) { // Allow "one past the end" sections.
|
} else if (addr > typeInfo.endAddr() + 1u) { // Allow "one past the end" zero-sized sections.
|
||||||
scriptError(
|
scriptError(
|
||||||
"Cannot set the current address to $%04" PRIx32 ": %s ends at $%04" PRIx16,
|
"Cannot set the current address to $%04" PRIx32 ": %s ends at $%04" PRIx16,
|
||||||
addr,
|
addr,
|
||||||
|
|||||||
@@ -1,19 +1,13 @@
|
|||||||
error: Cannot set the current address to $4000: ROM0 ends at $3fff
|
|
||||||
at script-oob-org.link(2)
|
|
||||||
error: Cannot set the current address to $4001: ROM0 ends at $3fff
|
error: Cannot set the current address to $4001: ROM0 ends at $3fff
|
||||||
at script-oob-org.link(3)
|
at script-oob-org.link(3)
|
||||||
error: Cannot decrease the current address (from $4000 to $3fff)
|
error: Cannot decrease the current address (from $4000 to $3fff)
|
||||||
at script-oob-org.link(6)
|
at script-oob-org.link(6)
|
||||||
error: Cannot set the current address to $8000: ROMX ends at $7fff
|
|
||||||
at script-oob-org.link(7)
|
|
||||||
error: Cannot set the current address to $8001: ROMX ends at $7fff
|
error: Cannot set the current address to $8001: ROMX ends at $7fff
|
||||||
at script-oob-org.link(8)
|
at script-oob-org.link(8)
|
||||||
error: Cannot decrease the current address (from $ff80 to $0000)
|
error: Cannot decrease the current address (from $ff80 to $0000)
|
||||||
at script-oob-org.link(11)
|
at script-oob-org.link(11)
|
||||||
error: Cannot decrease the current address (from $ff80 to $ff7f)
|
error: Cannot decrease the current address (from $ff80 to $ff7f)
|
||||||
at script-oob-org.link(12)
|
at script-oob-org.link(12)
|
||||||
error: Cannot set the current address to $ffff: HRAM ends at $fffe
|
|
||||||
at script-oob-org.link(14)
|
|
||||||
error: Cannot set the current address to $10000: HRAM ends at $fffe
|
error: Cannot set the current address to $10000: HRAM ends at $fffe
|
||||||
at script-oob-org.link(15)
|
at script-oob-org.link(15)
|
||||||
Linking failed with 9 errors
|
Linking failed with 6 errors
|
||||||
|
|||||||
Reference in New Issue
Block a user