l0dables: implement l0der
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)
Merge request reports
Activity
added 3-Epicardium label
mentioned in issue #56 (closed)
added 32 commits
-
d6020a85...732d4904 - 22 commits from branch
card10:master
- dbedd3e7 - l0dables: WIP
- 65b39ac7 - l0dables: mild refactor
- 4a724600 - l0der: fix relocation check
- 504dc738 - epicardium: load l0dable when present, for testing
- 8b77ca11 - fix indentation
- 853cdbb0 - blinky: reduce eye pain
- 18f942e6 - l0der: set up stack for l0dable
- e0529893 - l0der: support more alignment options
- ba7b0a0c - l0der: skip relocations for weak symbols
- 0f1dbf62 - l0dables/lib: implement stdout and heap via newlib
Toggle commit list-
d6020a85...732d4904 - 22 commits from branch
assigned to @rahix
- Resolved by rahix
- Resolved by rahix
- Resolved by rahix
- Resolved by rahix
- Resolved by rahix