loader: support Thumbv7-M dynamic applications and DSOs - #475
shihange-vivo wants to merge 4 commits into
Conversation
56f5d9c to
93ddd2e
Compare
|
Job is started, see https://github.com/vivoblueos/kernel/actions/runs/35333635066. |
|
❌ Job failed. Failed jobs: check_format (failure), build_and_check_boards (failure), see https://github.com/vivoblueos/kernel/actions/runs/35333635066. |
|
❌ Job failed. Failed jobs: apply_prs (cancelled), check_format (cancelled), check_license (cancelled), build_host (cancelled), build_and_check_boards (cancelled), see https://github.com/vivoblueos/kernel/actions/runs/35335060668. |
|
Job is started, see https://github.com/vivoblueos/kernel/actions/runs/35335270126. |
|
❌ Job failed. Failed jobs: check_license (failure), build_and_check_boards (failure), see https://github.com/vivoblueos/kernel/actions/runs/35335270126. |
|
Job is started, see https://github.com/vivoblueos/kernel/actions/runs/35336114515. |
|
❌ Job failed. Failed jobs: build_and_check_boards (failure), see https://github.com/vivoblueos/kernel/actions/runs/35336114515. |
|
Job is started, see https://github.com/vivoblueos/kernel/actions/runs/35337820529. |
|
❌ Job failed. Failed jobs: build_and_check_boards (failure), see https://github.com/vivoblueos/kernel/actions/runs/35337820529. |
Summary
Add support for dynamically linked applications and shared libraries on the Thumbv7-M soft-float profile.
The initial supported profile is:
EM_ARMET_DYNPIE applications and shared objectsR_ARM_RELATIVE,R_ARM_ABS32,R_ARM_GLOB_DAT, andR_ARM_JUMP_SLOTqemu_mps2_an385as the first validated boardThis change covers the complete path from artifact generation and ELF validation to dependency loading, relocation, execution, and application resource reclamation.
Motivation
BlueOS previously had an ELF image loader, but it did not provide a complete dynamic application runtime. In particular, it lacked:
DT_NEEDEDdependency closure loadingThis made it impossible to reliably run C, C++, Rust
no_std, and Ruststdapplications linked against shared libraries.Implementation
Loader and dynamic linker
ET_DYNapplications and theirDT_NEEDEDdependency closure.Application lifecycle
ApplicationManager,ApplicationService, andThreadGroup.Threadtype.Runtime integration
argc,argv,envp, and auxv to dynamic applications.main, atexit, destructors, pthread cleanup, and application exit.stdapplications and emulated TLS.Build integration
arm-none-eabi-gcctoolchain.//kernel/tests:check_dynamictarget.Validation
The following scenarios are covered by QEMU integration tests:
no_stdand RuststdapplicationsCurrent scope and limitations
This PR establishes the first supported Thumbv7-M dynamic ELF profile. It is not intended to implement every feature of a general-purpose ELF dynamic linker.
The current profile deliberately:
Unsupported ELF features are rejected during admission rather than being silently ignored.
Related PRs