News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Reconstructing source code files from an ELF's debug info?  (Read 943 times)


  • Jr. Member
  • **
  • Posts: 44
    • View Profile
Reconstructing source code files from an ELF's debug info?
« on: December 05, 2018, 12:26:49 pm »
I'm expecting to get a grand total of 0 help, but I figure I should just go ahead and ask anyway. I'm pretty much completely tearing apart Nintendo Puzzle Collection for the gamecube (specifically the Panel de Pon portion), and so far so good. I can edit and manipulate most of the files as I please. However, there's lots of embedded content in a particular file with the extension "plf" (file in question is panepon.plf) which I found out was actually just an elf file but renamed (or perhaps with slight differences). I've managed to open it with a disassembler, which happened to have function names mapping to particular portions of code. Likewise with some digging I have found the entire list of files that were used as the source code, along with all of the function names. So here's my question: is there a quick and easy way of taking this debug info in the file (source code file names and function names) and then constructing a disassembly using those things? That is: sort ASM by function and file? I noticed there's some files embedded in there as well (some bin files which I know how to edit, some song files, etc.). Is there any way to easily extract all of these? Perhaps have some sort of tool to be able to quickly disassemble into the separate files/functions, and then a way to compile them back together?

I was thinking it'd be amazing to have a rough disassembly to use to be able to modify the game and get working to label what all of the code does (allowing for complete changes/modes/additions to the game). But I'm a bit out of my league rn, as I struggle to even navigate the file on my own w/o my disassembler.

Any help would be greatly appreciated! ❤️