fpc/rtl/linux/riscv64
Pierre Muller b1a47a5d7d Use '__global_pointer$' special linker symbol to set gp,
because its value can be different from __BSS_END__ - 0x800.

Details from binutils-2.40/ld/emulparams/elf32lriscv-defs.sh
// We must cover as much of sdata as possible if it exists.  If sdata+bss is
// smaller than 0x1000 then we should start from bss end to cover as much of
// the program as possible.  But we can't allow gp to cover any of rodata, as
// the address of variables in rodata may change during relaxation, so we start
// from data in that case.
OTHER_END_SYMBOLS="${CREATE_SHLIB-__BSS_END__ = .;
    __global_pointer$ = MIN(__SDATA_BEGIN__ + 0x800,
                            MAX(__DATA_BEGIN__ + 0x800, __BSS_END__ - 0x800));}"
2025-01-16 17:20:14 +00:00
..
bsyscall.inc
si_c.inc Use '__global_pointer$' special linker symbol to set gp, 2025-01-16 17:20:14 +00:00
si_dll.inc
si_g.inc Use '__global_pointer$' special linker symbol to set gp, 2025-01-16 17:20:14 +00:00
si_prc.inc Use '__global_pointer$' special linker symbol to set gp, 2025-01-16 17:20:14 +00:00
sighnd.inc
sighndh.inc
stat.inc
syscall.inc
syscallh.inc
sysnr.inc