2

For PowerPCs how do you find out the TOC address or the SDA address? Like for example in this case.

3

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
3
  • Thanks! About the TOC any hint? – amgnet Dec 21 '16 at 15:11
  • @amgnet: same but with r2 instead of r13 – Igor Skochinsky Dec 21 '16 at 19:07
  • Thank you. I noticed more r2 loading references than r13 which is clearly one or 2 maximum. I would assume it should be also nearby? Is this the Global TOC right ? – amgnet Dec 22 '16 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.