blueberry077/y64_linker — reverse-engineered prompt

Reverse engineered prompt

Build me a tiny command line linker in C for the Yoshi’s Story N64 decomp project. I want it to take a MIPS ELF object file, a text file of symbol names and absolute RAM addresses, the RAM address where the code section should live, and the RAM address for the rodata section, then produce a raw .text binary blob instead of a full executable.

It should handle the relocations this project actually needs, especially R_MIPS_26 for jal and j, plus partial support for R_MIPS_HI16 and R_MIPS_LO16 so external symbols can be patched in from the symbol file. The symbols file should use a simple name = address format with comments allowed.

Please keep it lightweight and focused, with a clear usage message like input output symbolfile textAddress rodataAddress, and basic error messages when something is unsupported or malformed. A short README with build and usage instructions would be great too. If needed, look up current ELF relocation details online.

Want more depth? Deep Reverse