- A command line tool,
elf2djgpp
, that will convert x86 ELF object files to DJGPP COFF-GO32 objects. - An example project where both C and Rust functions are used, and DJGPP is used as Rust's global allocator.
- An ELF object is loaded using the elf crate
- Symbols get prefixed with
_
as DJGPP expects. - Code sections with relative relocations are modified so that the address operands point to the section start as DJGPP expects.
- Missing
compiler_builtins
symbols are replaced with DJGPP functions.
You'll need these installed:
- Rust nightly
- DJGPP (
i586-pc-msdosdjgpp-djgpp
in your$PATH
)
Build release or debug binaries:
$ cd example
$ make release # creates build/release/example.exe
$ make debug # creates build/debug/example.exe (much larger)
No. This is an exploration of file formats that ended up producing a useful script, but it's untested and probably not complete.