Dynamic Linking Considerations and Implementations: A Case Study of shecc
- Time
- 2026-08-09 12:50 ~ 13:20
- Speaker
- 蕭于恩
- Room
- TR213
- Co-write
Abstract
shecc is a self-hosting, optimizing C compiler that integrates a parser, Intermediate Representation (IR), Static Single Assignment Form (SSA), optimization algorithms, and a code generator within approximately 14000 lines of C code. It is capable of directly generating ELF executables for Arm or RISC-V architectures without relying on external assemblers or linkers.
Initially, shecc only supported the generation of statically linked executables. However, as of 2025, shecc has gained the capability to produce dynamically linked programs, allowing them to work with a fully functional C standard library (glibc) at runtime. This presentation illustrates the enhancements made to support dynamic linking and discuss the following key issues:
- Integrating dynamic sections into ELF executables.
- Implementing PLT/GOT mechanisms to facilitate runtime relocation via the dynamic linking.
- Improving Application Binary Interface (ABI) compatibility, specifically for the Arm architecture, to ensure the correctness and reliability of function calls.
Speaker
蕭于恩
畢業於國立高雄大學資訊系(2022 年),致力於投入系統軟體開發,目前在編譯器領域累積了一點點成果