ps3dev / ps3toolchain

A script to autobuild an open source toolchain for the PS3.
BSD 2-Clause "Simplified" License
280 stars 92 forks source link

TOC pointer is not modified when calling functions under certain circumstances #111

Open lephilousophe opened 3 years ago

lephilousophe commented 3 years ago

When building ScummVM with binutils 2.22, some calls were issued directly instead of using an adjusting stub responsible of setting the correct TOC address in r2. I couldn't identify the root cause of this bug nor commit in binutils fixed the bug but the build works perfectly using binutils 2.36.1.

There is only a patch to apply on PSL1GHT to make it align the got on a 256 bytes boundary instead of 8 because of commit bminor/binutils-gdb@a27e685fa0a6 in binutils.

I don't submit a PR for that because I didn't manage to have SPU build correctly with latest binutils.