It seems Hex-Rays will want to fix the automatic TOC detection if it’s a fixable thing but I hope this helps in the short term.
Speculating: I know 0xffffffff /0xffffffffffffffff is the value for BADADDR. If one tried to lookup a section by name in an ELF file where the section headers are stripped, that is the value I would expect it to return. Perhaps the IDA logic depends upon named .got, .got2, .opd or .toc section headers for TOC detection.
Disclosures: I haven’t worked directly with PS3 ELFs, but I do have experience with PowerPC, MIPS, and ELF binaries in general. I also read through a few PS3 reversing documents before replying, so apologies if I’ve misunderstood any PS3-specific details. Also, an LLM rewrote what I provided it.
Trying to be helpful:
MIPS has a similar concept called the Global Pointer (GP), and in IDA, changing its value manually after auto-analysis causes references to be re-evaluated automatically if I remember correctly. I don’t know whether the PS3 plugin behaves identically, but I would expect it to. If not, forcing a reanalysis would be worth trying.
If you’re new to Linux or FreeBSD, you may also be new to ELF binaries. A couple of readelf commands may be useful. You can install readelf easily on Linux, on Windows it might be easier to pip install pyelftools and use the readelf.py script it includes. It accepts the same arguments.
readelf -a <file>
This displays most of the ELF metadata, including program headers, section headers (if present), symbols, relocations, and the dynamic section.
On PS3, the TOC is not necessarily stored in a dedicated .toc section. Depending on how the binary was linked, you may find sections I mentioned earlier: .got, .got2, .opd, or .toc.
To list the sections:
readelf -SW <file>
The .opd section is particularly interesting on PowerPC64 because it contains function descriptors, including the TOC value used for each function.
If you don’t see those sections, it doesn’t necessarily mean the TOC is missing. According to what I read on it, retail PS3 executables are often distributed with their section headers stripped. In that case, readelf won’t show section names even though the underlying data is still present.
The TOC and function descriptor table are part of the loaded image, not the section headers themselves. If the section headers are gone, the TOC is typically recovered from the function descriptor table (.opd data), the entry point, or relocation information rather than from a section literally named .toc or .got.
Out of curiosity, what does the output of this say:
readelf -SW <file>
Does it list .got, .got2, .opd, or .toc? Or does it report that there are no section headers? That would help narrow down whether the loader simply failed to identify the TOC automatically.
If you don’t have readelf, you can install it on Linux with any package manager OR you can use the Python-based readelf clone readelf.py that is included with the pyelftools package (pip install pyelftools) and/or see pyelftools github project