Linker Relaxation in LLD
Talkat RISC-V Forum: Developer Tools and Tool Chains 2021 · on Wednesday, 2021-06-02· at 17:45· Virtual·
summary
LLD gains a RISC-V linker relaxation pass that rewrites conservative compiler sequences into smaller ones (AUIPC+JALR → JAL, JAL → compressed jumps) and converts high/low relocations to GP-relative accesses, producing concrete space savings like 3.2% size reduction on benchmarks. Implementation details: a new pass runs after layout but before relocations, makes mmap input sections writable, performs iterative low20/high20 passes, and handles alignment by inserting padding relocations so the linker can adjust sizes without breaking alignment guarantees.
AI-written summary · about
chapters (20)
- 0:00Introduction
- 0:40Linker realization
- 1:10Compile
- 1:52Linker
- 2:57Case
- 3:36Linker Relaxation
- 4:18Call Recession
- 5:26GP Relative realization
- 6:13Example
- 7:20Alignment Handling
- 10:18LLD
- 10:46Linkerization
- 11:32Proof Concept Patch
- 12:00LLD Overview
- 12:52Resolution Support
- 15:16Release
- 18:19Resolution
- 18:55Alignment
- 19:50Results
- 20:49Conclusion
related talks
15mDuplo: A Framework for OCaml Post-Link Optimisation
20mRelaxing Alias Analysis: Exploring the Unexplored Space
14mGuided Linking: Dynamic Linking without the Costs
27mCompiler Support for Control-Flow Linearization Using Architectural Mimicry
28mLLVM for RISCV
22mReconciling High-level Optimizations and Low-level Code in LLVM
19mGetting the Most out of the LLVM Auto Vectorizer for RISC-V Vectors (RVV)
01h 02mThinLTO: Scalable and Incremental Link-Time Optimization
