mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Port linkerscript parser to Bison (#1266)
Notable side effects: * Use the standard-conformant MSVC preproc * Add test for linker script INCLUDE * Improve wording of placement conflict errors * Fix errors from not newline-terminated files * Teach checkdiff about the linker script doc * Call linker script "commands" "directives" instead --------- Co-authored-by: Rangi42 <remy.oukaour+rangi42@gmail.com>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
error: ./linkerscript-escapes-test.link(4): Illegal character escape
|
||||
error: ./linkerscript-escapes-test.link(4): Cannot escape character '{'
|
||||
Linking failed with 1 error
|
||||
|
||||
2
test/link/linkerscript-include.asm
Normal file
2
test/link/linkerscript-include.asm
Normal file
@@ -0,0 +1,2 @@
|
||||
SECTION "test", ROM0[42]
|
||||
DB 1, 2, 3, 4, 5
|
||||
1
test/link/linkerscript-include.inc
Normal file
1
test/link/linkerscript-include.inc
Normal file
@@ -0,0 +1 @@
|
||||
"test"
|
||||
3
test/link/linkerscript-include.link
Normal file
3
test/link/linkerscript-include.link
Normal file
@@ -0,0 +1,3 @@
|
||||
; This has no newline at the end of the file
|
||||
ROM0
|
||||
INCLUDE "linkerscript-include.inc"
|
||||
2
test/link/linkerscript-include.out
Normal file
2
test/link/linkerscript-include.out
Normal file
@@ -0,0 +1,2 @@
|
||||
error: linkerscript-include.inc(1): The linker script assigns section "test" to address $0000, but it was already at $002a
|
||||
Linking failed with 1 error
|
||||
@@ -1,2 +1,2 @@
|
||||
error: Linker script contradicts "sec"'s alignment
|
||||
error: ./section-attributes-mismatch.link(3): The linker script assigns section "sec" to address $0018, but that would be ALIGN[4, 8] instead of the requested ALIGN[4, 0]
|
||||
Linking failed with 1 error
|
||||
|
||||
Reference in New Issue
Block a user