mirror of
https://github.com/gbdev/rgbds.git
synced 2026-05-08 10:59:36 +00:00
Add a few more linker script tests
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
rom0
|
||||
align 17, $1234
|
||||
@@ -0,0 +1,2 @@
|
||||
error: script-align-17.link(2): Cannot align: The alignment (17) must be less than 16
|
||||
Linking failed with 1 error
|
||||
@@ -0,0 +1,7 @@
|
||||
rom0
|
||||
ds $4000 ; OK
|
||||
ds 1 ; Boom!
|
||||
|
||||
hram
|
||||
ds $7F ; OK
|
||||
ds $FFFF ; Boom!
|
||||
@@ -0,0 +1,3 @@
|
||||
error: script-ds-overflow.link(3): Cannot increase the current address by 1 bytes: only 0 bytes to $4000
|
||||
error: script-ds-overflow.link(7): Cannot increase the current address by 65535 bytes: only 0 bytes to $ffff
|
||||
Linking failed with 2 errors
|
||||
@@ -0,0 +1,2 @@
|
||||
rom0
|
||||
align 1, 2
|
||||
@@ -0,0 +1,2 @@
|
||||
error: script-excess-align-ofs.link(2): Cannot align: The alignment offset (2) must be less than alignment size (2)
|
||||
Linking failed with 1 error
|
||||
@@ -0,0 +1,2 @@
|
||||
rom0
|
||||
ds $10000
|
||||
@@ -0,0 +1,2 @@
|
||||
error: script-huge-ds.link(2): Cannot increase the current address by 65536 bytes: only 16384 bytes to $4000
|
||||
Linking failed with 1 error
|
||||
@@ -0,0 +1,15 @@
|
||||
rom0
|
||||
org $4000 ; OK
|
||||
org $4001 ; Nope
|
||||
|
||||
romx 1
|
||||
org $3FFF ; Nope
|
||||
org $8000 ; OK
|
||||
org $8001 ; Nope
|
||||
|
||||
hram
|
||||
org 0 ; Nope
|
||||
org $FF7F ; Nope
|
||||
org $FF80 ; OK
|
||||
org $FFFF ; OK
|
||||
org $10000 ; Nope
|
||||
@@ -0,0 +1,10 @@
|
||||
error: script-oob-org.link(2): Cannot set the current address to $4000: ROM0 ends at $3fff
|
||||
error: script-oob-org.link(3): Cannot set the current address to $4001: ROM0 ends at $3fff
|
||||
error: script-oob-org.link(6): Cannot decrease the current address (from $4000 to $3fff)
|
||||
error: script-oob-org.link(7): Cannot set the current address to $8000: ROMX ends at $7fff
|
||||
error: script-oob-org.link(8): Cannot set the current address to $8001: ROMX ends at $7fff
|
||||
error: script-oob-org.link(11): Cannot decrease the current address (from $ff80 to $0000)
|
||||
error: script-oob-org.link(12): Cannot decrease the current address (from $ff80 to $ff7f)
|
||||
error: script-oob-org.link(14): Cannot set the current address to $ffff: HRAM ends at $fffe
|
||||
error: script-oob-org.link(15): Cannot set the current address to $10000: HRAM ends at $fffe
|
||||
Linking failed with 9 errors
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
romx 2
|
||||
org $7000
|
||||
"ROM2 1K" ; OK
|
||||
"ROM2 1" ; Boom!
|
||||
@@ -0,0 +1,2 @@
|
||||
error: script-overflowing-sect.link(5): The linker script assigns section "ROM2 1" to address $8000, but then it would overflow ROMX by 1 byte
|
||||
Linking failed with 1 error
|
||||
@@ -0,0 +1 @@
|
||||
"The section isn't even known"
|
||||
@@ -0,0 +1,2 @@
|
||||
error: script-typeless-bank.link(1): No memory region has been specified to place section "The section isn't even known" in
|
||||
Linking failed with 1 error
|
||||
@@ -3,3 +3,7 @@
|
||||
|
||||
SECTION "ROM0", ROM0
|
||||
SECTION "ROM1", ROMX,BANK[1]
|
||||
SECTION "ROM2 1K", ROMX,BANK[2]
|
||||
ds $1000
|
||||
SECTION "ROM2 1", ROMX,BANK[2]
|
||||
ds 1
|
||||
|
||||
Reference in New Issue
Block a user