Hacking Is "Unwinding EBOOT Relocations" a Valid Strategy?

flame1234

Well-Known Member
OP
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
I couldn't figure it out by reading the docs so I did this by guess and check.
If you want to look at the docs on relocation, I think it's this one: http://www.sco.com/developers/devspecs/mipsabi.pdf

There is a LOPROC+a0 program segment in PSP EBOOTs. If your EBOOT does not have a LOPROC+a0 program segment, then it does not have relocations.
I'm working on Students of Round: The Eternal Legend. Here is the readELF output for the EBOOT so you can see the LOPROC+a0 segment: http://pastebin.com/Hw4kyTpj

Here's what relocation entries look like:
Capture.PNG

Red is the TARGET and green is the RELOCATION TYPE
I found out that relocation type 0x02000000 just adds 0x8804000 to the target. For other types, experimentation (or someone who understands the docs) will be needed. For relocation type 0x02000000:
1) Load the value at the target. Targets are specified by virtual address. For my EBOOT, the target is in the first program segment (virtual address 0) and that segment has a file offset of 0xC0 so you have to add 0xC0 to the target to get the file address.
2) Add 0x8804000 to that value
3) Zero out the entire relocation entry (8 bytes)

Is it a valid strategy to go through and the EBOOT and unwind all these relocations?
I tried programmatically going through and replacing all the relocations of type 0x02000000 for this EBOOT and it appeared to run normally in PPSSPP (approx 14,000 relocations replaced).

I need to unwind them because there are pointers in this "relocated" data that I need to change. It's easier to unwind the relocations first and then change them and also easier to search for the pointers.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Psionic Roshambo @ Psionic Roshambo:
    Having every channel is fun lol
  • D @ diamondsofmayhem:
    Actually, finally found someone who was looking for the same thing. https://gbatemp.net/threads/lost-hyrule-warriors-legends-v1-6-0-ntr-plugin.628141/ to no avail.
  • D @ diamondsofmayhem:
    well, sorry for bugging yall with this.
  • Xdqwerty @ Xdqwerty:
    good night
  • Sicklyboy @ Sicklyboy:
    sup nerds
    +1
  • BigOnYa @ BigOnYa:
    Sup dawg, watching old rap vids so feel like I gotta talk...Real
  • BigOnYa @ BigOnYa:
    Not really just funny. I'm definitely a nerd!
  • ShinyLuxio @ ShinyLuxio:
    Hi there, it's any way to recover original LFCS if I don't have a NAND backup?
  • ShinyLuxio @ ShinyLuxio:
    Bought second hand 3DS, it seems it was "unbanned" but that was before I bought it
  • K3Nv2 @ K3Nv2:
    I got these in today for $20 stink buds they aren't that bad https://a.co/d/fOMSn8g
    +1
  • ShinyLuxio @ ShinyLuxio:
    @BigOnYa thanks but my question isn't there
  • BigOnYa @ BigOnYa:
    You ask your questions there, create a new thread if its not already answered, then eventually a 3ds genius will respond.
  • ShinyLuxio @ ShinyLuxio:
    I will, thanks
    +1
  • BigOnYa @ BigOnYa:
    No prob and btw, welcome to gbatemp! :grog:
  • BigOnYa @ BigOnYa:
    @K3Nv2 I got some cheapies at wallys, that are pretty good, already have lost a few expensive ones (one falls out and gone, can't find) while cutting grass so bought some cheap ones, and of course never lose these cheap ones. (Cheap meaning only $35, compared to air buds which I only have 1 of 2 now)
  • BigOnYa @ BigOnYa:
    They need to add air tags to they airbuds..
  • The Real Jdbye @ The Real Jdbye:
    @BigOnYa the airtags are bigger than the airpods, they won't fit
    +1
  • BigOnYa @ BigOnYa:
    Be cool tech tho. Of course they want to lose them anyways. Buy and buy again.
  • K3Nv2 @ K3Nv2:
    Apple could make a find my AirPods thing pretty easily
    +1
  • BigOnYa @ BigOnYa:
    You would think, esp using bluetooth, not GPS, like a "your getting hot-er" meter on your phone.
  • BigOnYa @ BigOnYa:
    I think they should tie up diddy, and let all the victims come and abuse him, we'll make a holiday of it every year. (jk, maybe)
  • BigOnYa @ BigOnYa:
    Crazy, the rich get away with this shit, and I can't shit without the poop police checking my asshole every time I shit, or if i have my toilet seatbelt on.
    BigOnYa @ BigOnYa: Crazy, the rich get away with this shit, and I can't shit without the poop police checking my...