riidefi / mkw

Decompilation of Mario Kart Wii
310 stars 32 forks source link

Relocatable DOL hack #176

Open riptl opened 2 years ago

riptl commented 2 years ago

Update gen_asm to create relocatable assembly for DOL .text section.

Steal approach used by @camthesaxman's doldisasm

  1. lis/la effective address matcher
  2. mechanism to export the refs from gen_asm on .text to gen_asm in .data (probably easiest here is to just modify symbols.txt on the fly)
  3. regex to replace offsets use capstone label callback to replace literal offsets with symbol refs
riptl commented 2 years ago

Picking this up today.