Skip to content
Commit 073cfa9c authored by Jim Shu's avatar Jim Shu Committed by Christopher Friedt
Browse files

arch: riscv: introduce global pointer relative addressing support



Enable RISC-V GP relative addressing by linker relaxation to reduce
the code size. It optimizes addressing of globals in small data section
(.sdata).

The gp initialization at program start needs each SoC support. Also,
if RISC-V SoC has custom linker script, SoC should provide
__global_pointer$ symbol in it's linker script.

Signed-off-by: default avatarJim Shu <cwshu@andestech.com>
parent 8ed9cddb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment