Check .sym file reported addresses and sorting
Rangi42 opened this issue · 4 comments
From pinobatch:
I'm noticing some strange overlaps when building 144p Test Suite using RGBDS master. RGBDS 0.7.0 builds it correctly.
The tools are reporting their version as v0.7.0-200-g846a9411
All these symbols show up as $0100 for some reason
$0100 = vwfPutBufHBlank.nondraw
$0100 = sgb_sound_draw_values.do3rows
SECTION: $0100-$014f ($0050 bytes) ["header"]
Repository is https://github.com/pinobatch/240p-test-mini, at HEAD of master
Also, when two SECTION UNIONs put the same symbol at the same address (but not exporting them), macOS CI sorts the .sym file differently.
It gets worse: look at all the different sections that get mapped to $0018
.
gb240p.map
gb240p.sym
I set up a bisection
# set the boundaries
git checkout master
git bisect start
make clean && make -j3
# build libbet in other terminal
git bisect bad
git checkout v0.7.0
# HEAD is detached
make clean && make -j3
# build libbet in other terminal
git bisect good
In the other terminal, I was running this command
make clean && make -j3 libbet.gb RGBDS=/home/pino/develop/assemblers/rgbds/ && sameboy libbet.gb
Result: #1323 broke it
446fb07fd5ea651557ef86eb54b5f93f06a204dd is the first bad commit
commit 446fb07fd5ea651557ef86eb54b5f93f06a204dd
Author: Sylvie <35663410+Rangi42@users.noreply.github.com>
Date: Fri Mar 1 16:21:29 2024 -0500
Use `std::deque<std::vector>` for free space (#1323)
Log:
# status: waiting for both good and bad commits
# bad: [846a9411b9ea0676bdc4b7dc6ac89c98020af8af] Refactor `FileStackNode::dump` to not need a helper function
git bisect bad 846a9411b9ea0676bdc4b7dc6ac89c98020af8af
# status: waiting for good commit(s), bad commit known
# good: [08f3e360c9525b65291db9cee66fc5eb6e4a45e4] Release v0.7.0
git bisect good 08f3e360c9525b65291db9cee66fc5eb6e4a45e4
# good: [962398969bfe492e10b92205641800b70af63bd6] Use `std::string` for `PURGE` args
git bisect good 962398969bfe492e10b92205641800b70af63bd6
# bad: [ba183e900b4550d2040c5e255bef27c8b8861ee8] Update contributors
git bisect bad ba183e900b4550d2040c5e255bef27c8b8861ee8
# good: [eff8c324c8547c476f29cb49585cc9f47541b0fe] Remove now-unnecessary `struct` keyword (#1320)
git bisect good eff8c324c8547c476f29cb49585cc9f47541b0fe
# bad: [dbcb82799e197cd247e03df4a34b97cc8e0ab95d] Use `std::vector` for capture buffer
git bisect bad dbcb82799e197cd247e03df4a34b97cc8e0ab95d
# bad: [701b926288959be18f881ad919ce61580701ec59] Use RAII `std::string` and `std::vector` in randtilegen (#1325)
git bisect bad 701b926288959be18f881ad919ce61580701ec59
# good: [e14ba664ea5615d18ff22c3054311d204ba81315] Remove redundant `(void)` parameter declarations
git bisect good e14ba664ea5615d18ff22c3054311d204ba81315
# bad: [446fb07fd5ea651557ef86eb54b5f93f06a204dd] Use `std::deque<std::vector>` for free space (#1323)
git bisect bad 446fb07fd5ea651557ef86eb54b5f93f06a204dd
# good: [1ac3c0262f16076b289a61535d924cac38bd1bee] Refactor structs to use methods instead of functions (#1322)
git bisect good 1ac3c0262f16076b289a61535d924cac38bd1bee
# first bad commit: [446fb07fd5ea651557ef86eb54b5f93f06a204dd] Use `std::deque<std::vector>` for free space (#1323)
anyone want to debug that?
or, does anyone have a minimal example that gives a different ROM after that commit? My tests with a few floating sections are still the same (although the .sym file is sorted differently/wrongly).