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.
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 intorv32jit
) is 280KB in size. Since we do not need the full functionality oflibelf
, 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 aslibelf
. This issue is about dropping thelibelf
dependency.