.sym file sorting accounts for local labels' parents' addresses and names (#1684)

This commit is contained in:
Rangi
2025-05-05 13:57:25 -04:00
committed by GitHub
parent e95ac6fb06
commit d413870e6d
10 changed files with 55 additions and 28 deletions

View File

@@ -0,0 +1,3 @@
section "a", rom0
export def parent = 42
db 1, 2, 3

View File

@@ -0,0 +1,4 @@
section "b", rom0
db 4, 5, 6
parent.child::
db 7, 8, 9

View File

View File

@@ -0,0 +1 @@
 

View File

@@ -0,0 +1,3 @@
; File generated by rgblink
00:0003 parent.child
2a parent

View File

@@ -2,8 +2,8 @@
00:0000 Part1
00:0004 Part1End
00:0004 Part2
00:0010 Part3
00:0010 Part2End
00:0010 Part3
00:0014 Part3End
00:c000 wPart1
00:c004 wPart3

View File

@@ -1,16 +1,16 @@
; File generated by rgblink
00:0000 Beta
00:0003 End
00:0003 Alpha
00:0003 End
00:0006 End
00:c000 wStart
00:c000 wStart
00:c000 wStart.word1
00:c000 wStart.long1
00:c000 wStart.word1
00:c002 wStart.word2
00:c004 wEnd
00:c004 wEnd
00:c004 wBeta
00:c007 wBeta.End
00:c004 wEnd
00:c004 wEnd
00:c007 wAlpha
00:c007 wBeta.End
00:c00a wAlpha.End

View File

@@ -149,6 +149,17 @@ rgblinkQuiet -o "$gbtemp" "$otemp" "$gbtemp2" 2>"$outtemp"
tryDiff "$test"/out.err "$outtemp"
evaluateTest
test="constant-parent"
startTest
"$RGBASM" -o "$otemp" "$test"/a.asm
"$RGBASM" -o "$gbtemp2" "$test"/b.asm
continueTest
rgblinkQuiet -o "$gbtemp" -n "$outtemp2" "$otemp" "$gbtemp2" 2>"$outtemp"
tryDiff "$test"/out.err "$outtemp"
tryDiff "$test"/ref.out.sym "$outtemp2"
tryCmpRom "$test"/ref.out.bin
evaluateTest
for test in fragment-align/*; do
startTest
"$RGBASM" -o "$otemp" "$test"/a.asm