ethteck / splat

A binary splitting tool to assist with decompilation and modding projects
MIT License
170 stars 43 forks source link

Make cpp segments use .cpp.o in the linker script #390

Closed ethteck closed 2 months ago

ethteck commented 3 months ago

make sure we haven't missed others too

ethteck commented 3 months ago

this seems like not an actual issue. waiting to hear back

ethteck commented 3 months ago

image image https://github.com/ieee802dot11ac/amp/blob/master/config/amp.yaml#L1892 image

AngheloAlf commented 3 months ago

I don't understand how they are getting this problem. Pairing .text/.rodata with a .cpp file worked fine to me on my hit_and_run repo.

ieee802dot11ac commented 3 months ago

It appears using o_as_suffix sidesteps this issue entirely, as i.e. src/utl/PrnStream.cpp becomes src/utl/PrnStream.o.

ethteck commented 3 months ago

were you getting .cpp.o @AngheloAlf ? if so there's still probably a bug or something. I can try to clone the repo and check it out

AngheloAlf commented 3 months ago

I definitely use o_as_suffix, that must be why I'm not getting this issue

AngheloAlf commented 3 months ago

I just checked this on my hit_and_run repo again. I can't reproduce the issue even when turning off o_as_suffix.

My the relevant entries from my yaml looks like this:

      - [0x062648, cpp, code/allps2main]
      # ...
      - [0x35D010, .rodata, code/allps2main]

Using o_as_suffix: True the generated linker script looks like this:

        build/us_2003_07_10/src/code/allps2main.o(.text);
        /* ... */
        build/us_2003_07_10/src/code/allps2main.o(.rodata);

Using o_as_suffix: False the generated linker script looks like this:

        build/us_2003_07_10/src/code/allps2main.cpp.o(.text);
        /* ... */
        build/us_2003_07_10/src/code/allps2main.cpp.o(.rodata);
AngheloAlf commented 3 months ago

@ieee802dot11ac Actually your yaml looks a bit wrong. Each one of your sections are to be placed on different top-level segments, which prevents splat from being able to pair them. All of them should be present on your main segment just as a bunch of other entries. You can see this on my my hit_and_run repo, the data, rodata, etc sections are just entries of the only important segment

ethteck commented 2 months ago

It looks like the root issue has been resolved, so I'm gonna close this for now. Feel free to reply if this is still a problem or open a new one if you run into something else!