Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort symbols by address, then parentage, then index #1186

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

Rangi42
Copy link
Contributor

@Rangi42 Rangi42 commented Oct 28, 2023

Fixes #1151

With this file:

SECTION "test3", ROM0
Eggs:
 ret
 .end
Egg:
 ret
 .end
SECTION "test2", ROM0[3]
Quux:
 ret
 .end
Frob:
 .frob:
SECTION "test", ROM0[0]
Foo:
 ret
 .end
Bar:
 ret
 .end
Baz:
 ret
 .end

The previous .sym output was this:

00:0000 Foo
00:0001 Foo.end
00:0001 Bar
00:0002 Baz
00:0002 Bar.end
00:0003 Baz.end
00:0003 Quux
00:0004 Frob
00:0004 Frob.frob
00:0004 Quux.end
00:0004 Eggs
00:0005 Egg
00:0005 Eggs.end
00:0006 Egg.end

And the fixed .sym output is this:

00:0000 Foo
00:0001 Foo.end
00:0001 Bar
00:0002 Bar.end
00:0002 Baz
00:0003 Baz.end
00:0003 Quux
00:0004 Frob
00:0004 Frob.frob
00:0004 Quux.end
00:0004 Eggs
00:0005 Eggs.end
00:0005 Egg
00:0006 Egg.end

(Any particular sorting is not guaranteed by the man page, and .sym output is not something we've previously tested, so this isn't one of the CI test cases; just something to demonstrate the change for review.)

@Rangi42 Rangi42 added enhancement Typically new features; lesser priority than bugs rgblink This affects RGBLINK labels Oct 28, 2023
@Rangi42 Rangi42 added this to the v0.6.2 milestone Oct 28, 2023
@Rangi42 Rangi42 requested a review from ISSOtm October 28, 2023 16:35
@Rangi42 Rangi42 requested a review from ISSOtm November 2, 2023 21:16
@ISSOtm ISSOtm merged commit 9e4b9e7 into gbdev:master Nov 2, 2023
24 checks passed
@Rangi42 Rangi42 deleted the sort-sym branch November 3, 2023 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Typically new features; lesser priority than bugs rgblink This affects RGBLINK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sort local symbols before global ones in sym files
2 participants