mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-28 22:07:49 +00:00
link: Suppress cascading errors.
This commit is contained in:
2
test/link/cascading-errors-fatal-assert.asm
Normal file
2
test/link/cascading-errors-fatal-assert.asm
Normal file
@@ -0,0 +1,2 @@
|
||||
assert FATAL, UnknownSymbol == 42
|
||||
assert WeDontReachHere
|
||||
3
test/link/cascading-errors-fatal-assert.out
Normal file
3
test/link/cascading-errors-fatal-assert.out
Normal file
@@ -0,0 +1,3 @@
|
||||
error: cascading-errors-fatal-assert.asm(1): Unknown symbol "UnknownSymbol"
|
||||
fatal: cascading-errors-fatal-assert.asm(1): couldn't evaluate assertion
|
||||
Linking aborted after 2 errors
|
||||
19
test/link/cascading-errors.asm
Normal file
19
test/link/cascading-errors.asm
Normal file
@@ -0,0 +1,19 @@
|
||||
SECTION "zero", ROM0[$0]
|
||||
Zero:
|
||||
|
||||
; Pin the section such that a jr to 0 is out of range
|
||||
SECTION "test", ROM0[$1000]
|
||||
;; XXX: the fallback value used is the index of the symbol (in the object file?)
|
||||
;; Is this intended?
|
||||
dw Bar
|
||||
dw Foo / Bar
|
||||
dw Foo / Zero
|
||||
|
||||
rst Foo
|
||||
|
||||
jr NonExist
|
||||
|
||||
ldh a, [hNonExist + $200]
|
||||
|
||||
assert Foo == 42
|
||||
assert WARN, Bar == 42
|
||||
11
test/link/cascading-errors.out
Normal file
11
test/link/cascading-errors.out
Normal file
@@ -0,0 +1,11 @@
|
||||
error: cascading-errors.asm(18): Unknown symbol "Foo"
|
||||
error: cascading-errors.asm(19): Unknown symbol "Bar"
|
||||
error: cascading-errors.asm(16): Unknown symbol "hNonExist"
|
||||
error: cascading-errors.asm(14): Unknown symbol "NonExist"
|
||||
error: cascading-errors.asm(12): Unknown symbol "Foo"
|
||||
error: cascading-errors.asm(10): Unknown symbol "Foo"
|
||||
error: cascading-errors.asm(10): Division by 0
|
||||
error: cascading-errors.asm(9): Unknown symbol "Foo"
|
||||
error: cascading-errors.asm(9): Unknown symbol "Bar"
|
||||
error: cascading-errors.asm(8): Unknown symbol "Bar"
|
||||
Linking failed with 10 errors
|
||||
Reference in New Issue
Block a user