Searched hist:af9ee0e0ed11977217f30ce1c1375639613147cd (Results 1 – 1 of 1) sorted by relevance
| /optee_os/lib/libutee/arch/riscv/ |
| H A D | utee_syscalls_rv.S | af9ee0e0ed11977217f30ce1c1375639613147cd Wed May 24 16:22:47 UTC 2023 Alvin Chang <alvinga@andestech.com> libutee: riscv: Fix relocation type of function call into __utee_panic()
In RISC-V, "j" instruction has R_RISCV_JAL relocation that can represent an even signed 21-bit offset (+-1MiB). However, this range is not enough to be position independent code, and the linker generates linking error. Fix it by using "tail" instruction which has R_RISCV_CALL_PLT relocation that the execution can jump to +-2GB location.
Note that we won't return from _utee_panic(), that's why we use "tail" instead of "call" instruction so that we won't generate redundant return instruction.
Signed-off-by: Alvin Chang <alvinga@andestech.com> Acked-by: liushiwei <liushiwei@eswincomputing.com>
|