jserv / rv32jit

JIT-accelerated RISC-V instruction set simulator
MIT License
31 stars 7 forks source link

Drop the dependency on libelf #12

Open jserv opened 11 months ago

jserv commented 11 months ago

At present, libelf is used for parsing and reading given ELF files, but it is a bit heavy. Measuring on Ubuntu Linux 20.04, the stripped libelf occupies 107KB in file size, while the stripped rv32jit executable (AsmJit is statically linked into rv32jit) is 280KB in size. Since we do not need the full functionality of libelf, we can follow the approach that rv32emu uses to deal with ELF files. This involves implementing the necessary facilities on our own, without the need for external libraries such as libelf. This issue is about dropping the libelf dependency.