基于STM32动态加载实现原理
https://www.armbbs.cn/forum.php?mod=viewthread&tid=112099
https://gitee.com/wzh1845462801/dynamic_loader
https://www.armbbs.cn/forum.php?mod=viewthread&tid=109952
Following resources helped me:
- https://github.com/bogdanm/udynlink
- https://github.com/pebble-dev/RebbleOS/blob/master/rcore/appmanager.c
- https://dl.acm.org/doi/abs/10.1145/1067170.1067188
- https://github.com/tock/tock
- https://www.airs.com/blog/archives/38
- 40 part explaination about linkers
- https://www.technovelty.org/linux/plt-and-got-the-key-to-code-sharing-and-dynamic-libraries.html
- Explains PLT and GOT
- https://stackoverflow.com/questions/3322911/what-do-linkers-do/33690144#33690144
- Explains relocation with a proper worked out example
- https://stackoverflow.com/questions/2463150/what-is-the-fpie-option-for-position-independent-executables-in-gcc-and-ld/51308031#51308031
- Explains PIE relocation with a proper worked out example
- https://stac47.github.io/c/relocation/elf/tutorial/2018/03/01/understanding-relocation-elf.html
- worked out example of relocation in dynamic and static linking
- Dynamic linking
- load time relocation
- https://eli.thegreenplace.net/2011/08/25/load-time-relocation-of-shared-libraries
- https://www.youtube.com/watch?v=wYmhUbhkbhQ -Demonstrates load time relocation
- PIC - Position Independent code
- For Cortex-M
- https://stackoverflow.com/questions/5619178/how-to-write-dynamic-loader-for-bare-metal-arm-application
- Explains how to do jump tables (jumptables) using C struct
- https://stackoverflow.com/questions/50655162/stm32-position-independent-binaries
- Position independent code
- https://github.com/embedded2014/elf-loader
- https://github.com/martinribelotta/elfloader
- ELF Loader
- http://www.chibios.com/forum/viewtopic.php?f=3&t=1229
- partial linking and comparison of different dynamic loading options
- https://stackoverflow.com/questions/44632383/dynamically-load-code-on-embedded-target
- Shows partial linking
- In the ld documentation check out --relocatable and --just-symbols
- https://static.docs.arm.com/ihi0044/f/IHI0044F_aaelf.pdf
- ARM ELF Format
- https://stackoverflow.com/questions/5619178/how-to-write-dynamic-loader-for-bare-metal-arm-application
- load time relocation
https://github.com/rgujju/Dynamic_App_Loading
https://github.com/bogdanm/udynlink
threadx module
ThreadX Modules 提供了动态加载的模块,这些模块独立于应用程序进行构建
https://www.armbbs.cn/forum.php?mod=viewthread&tid=99276
https://www.rt-thread.org/document/api/group___module.html
使用 QEMU 运行动态模块组件
https://www.bookstack.cn/read/rtthread-application-note/22.md
https://github.com/RT-Thread/rtthread-manual-doc/blob/master/dlmodule/README.md
tcc