cknave / elf2djgpp

Convert ELF object files to DJGPP COFF-GO32 objects
MIT License
10 stars 2 forks source link

elf2djgpp

What is this?

What does it do?

  1. An ELF object is loaded using the elf crate
  2. Symbols get prefixed with _ as DJGPP expects.
  3. Code sections with relative relocations are modified so that the address operands point to the section start as DJGPP expects.
  4. Missing compiler_builtins symbols are replaced with DJGPP functions.

How do I try it?

You'll need these installed:

Build release or debug binaries:

$ cd example
$ make release  # creates build/release/example.exe
$ make debug    # creates build/debug/example.exe (much larger)

Should I use this for anything serious?

No. This is an exploration of file formats that ended up producing a useful script, but it's untested and probably not complete.