encounter / dtk-template

Project template for decomp-toolkit
Creative Commons Zero v1.0 Universal
17 stars 14 forks source link

Build failed with "Linker Error: # Multiple output section name '.rodata' not allowed in linker command file." #26

Closed gwoonryan closed 2 months ago

gwoonryan commented 2 months ago

Hi, after following all the steps in the "getting_started.md" file until the first analysis, the program crashed with this error:

> PS C:\Users\ryanv\Desktop\code\wii\decomp toolkit\dtk-template> ninja
> [1/2] SPLIT config\RSPE01\config.yml
>  INFO Loading config\RSPE01\config.yml
>  INFO Loading and analyzing 1 module (using 1 thread)
>  INFO Initial analysis completed in 1.118s (found 14119 functions)
>  INFO Rebuilding relocations and splitting
>  WARN module{name=main id=0}: Alignment for auto_11_804BF314_sbss .sbss expected 8, but starts at 11:0x804BF314
>  INFO Splitting completed in 2.845s (wrote 518 objects)
>  INFO Total time: 3.969s
> [2/2] RUN configure.py
> [1/4] LINK build\RSPE01\main.elf
> FAILED: build/RSPE01/main.elf
> build\compilers\GC\1.3.2\mwldeppc.exe -fp hardware -nodefaults -lcf build\RSPE01\ldscript.lcf -o build\RSPE01\main.elf @build\RSPE01\main.elf.rsp
>  build\compilers\GC\1.3.2\mwldeppc.exe Linker Error:
>     Multiple output section name '.rodata' not allowed in linker command file.
>  build\compilers\GC\1.3.2\mwldeppc.exe Linker Alert:
>     Link failed.
> 
> Errors caused tool to abort.
> ninja: build stopped: subcommand failed.

I am trying to decompile Wii Sports, is this an issue on my part, or is it a bug in the decompiler? I have attached the generated splits, the generated symbols and my config.

splits.txt symbols.txt config - copy.txt

encounter commented 2 months ago

One of the rodata sections that dtk detected is actually .BINARY (note the existing Wii Sports decomp here, it has it labeled .file, but .BINARY is the correct section name).

You can rename that section in splits.txt, delete symbols.txt and let it regenerate.

gwoonryan commented 2 months ago

Thanks for the help! It actually made it work, but it is probably better if I use the already made decomp, but I just cant find "codewarrior/GC/3.0" anywhere... Can you maybe help we with this in some way or another?

encounter commented 2 months ago

You’ll already have it under build/compilers, dtk-template downloads it automatically.

gwoonryan commented 2 months ago

The decompilation specifically asks for the versions "2.7, 3.0 and 3.0a3" I found 2.7 and 3.0a3 there but not 3.0 unfortunately... Is it supposed to be there?

encounter commented 2 months ago

I think 3.0a5 is the right version for that, but I’m unsure.

gwoonryan commented 2 months ago

I think this actually works, I will test some more but thank you so much!

encounter commented 2 months ago

No problem!