Skip to content

l0dables: implement l0der

q3k requested to merge q3k/firmware:q3k/l0dables into master

This change implements l0der, a loader for PIE ELF l0dables.

It's a simple ELF loader made purpose-specific for card10. It only supports the type of relocation that we seem to find in PIE binaries: R_ARM_RELATIVE. There's a chance we'll need to implement some other ones in the future. It does not even look at symbols and most sections. However, it should be written defensively enough that programs that are incompatible with its assumptions will refuse to load, rather than load and crash/misbehave.

We integrate the l0der into epicardium for testing: if there's a lodable.elf in the external flash, we load it. Otherwise, we run pycardium. This is temporary.

We also provide a buildsystem for l0dables and an example.

Outside of the scope of this MR:

  • end-user documentation (we wait until we finalize the l0dable architecture, build system, and loader)
  • pycardium integration and l0dable lifecycle support
  • loading l0dables ELFs via GDB (needs some consideration)
Edited by q3k

Merge request reports