Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
For PowerPCs how do you find out the TOC address or the SDA address?
Like for example in this case.
SDA is r13, and it changes very rarely. So finding any assignment to r13 will solve the problem for SDA.
Specifically for the referred example it was
lis r13, 1 # Load Immediate Shifted
addi r13, r13, -0x2BF0 # 0xD410 # Add Immediate
Required, but never shown