Searched hist:"851 d05e65f9c638b6805e7cc135c9cc31577c6d2" (Results 1 – 1 of 1) sorted by relevance
| /optee_os/core/arch/riscv/kernel/ |
| H A D | kern.ld.S | 851d05e65f9c638b6805e7cc135c9cc31577c6d2 Thu Jan 18 08:03:55 UTC 2024 Yu Chien Peter Lin <peterlin@andestech.com> core: riscv: Add .sbss and .sdata sections to linker script
Currently, the unclean .sbss section in RISC-V binary could be problematic. This is because variables such as puts_lock may have non-zero initial values, leading to failures in cpu_spin_trylock(). To address this issue, merge .sbss into .bss so that it is properly cleared on boot. Both OpenSBI [1] and Linux [2] follow this approach.
Also, to benefit from global pointer relaxation, add .sdata after the __global_pointer$ symbol.
Link: https://github.com/riscv-software-src/opensbi/blob/bb90a9ebf6d9a2fe7726978d594e82cdbaad7799/firmware/fw_base.ldS#L84 [1] Link: https://github.com/torvalds/linux/blob/296455ade1fdcf5f8f8c033201633b60946c589a/include/asm-generic/vmlinux.lds.h#L1146 [2] Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com> Reviewed-by: Alvin Chang <alvinga@andestech.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
|