pspdev / psptoolchain-allegrex

This program will automatically build and install an Allegrex compiler which is used in the creation of homebrew software for the Sony PlayStation® Portable videogame system.
MIT License
10 stars 9 forks source link

Disable init/fini arrays to fix C++ constructors #18

Closed davidgfnet closed 1 year ago

davidgfnet commented 1 year ago

As it is, the support for init/fini constructors is not working (probably broken). This disables it and rolls back to ctor/dtor style runtime. This is what sdk/lib/linkfile.prx already uses, however elf_mipsallegrexel_psp.* broke due to support being enabled by default after the binutils update.

This results in .ctors/dtors sections being linked toghether again and the _start code in crt0 doing its job and initializing C++ objects. We leave the migration to init/fini arrays to the next binutils/gcc update.