anirbandotdev/minimal-elf-loader ? reverse-engineered prompt
Reverse engineered prompt
Build me a tiny 32 bit ELF loader in C that can read an ELF file, load its segments into memory, and jump to the entry point so I can run simple programs with it.
I want it to be very minimal and easy to follow, not a huge framework. Include a basic build script so I can compile it quickly, and if you can add a small test folder or sample ELF to try it with, that would help. It does not have to be perfect or support every weird case, but it should handle the common stuff cleanly and print useful errors when something goes wrong.
If you need to look up current details about ELF headers or how to load segments correctly, go ahead and check the docs online. Keep the code straightforward and use plain C. I mostly want something that works well enough to learn from and experiment with, even if it is a bit rough around the edges.
Are you gonna build this?
make sure you review the code using coderabbit