Fix the compile errors "R_RISCV_JAL out of rang" when the jump range is greater than 1M memory space between vfork and __set_errno_internal

the "tail" command is used here, let the compiler decide
which instruction to use. when the call distance is less
than 1M, it will be compiled into "jr" command, and when
the distance is greater than 1M, it will be compiled
into "aupic" and "jr" command.

Test: make libc
Change-Id: I80d099d25c7cc2439a297d8afc65abeb5a7a360c
Signed-off-by: caowencheng <caowencheng@eswincomputing.com>
This commit is contained in:
caowencheng 2023-03-07 14:05:34 +08:00 committed by wencheng cao
parent 78f71a53e5
commit d27c83fbd4

View file

@ -62,5 +62,5 @@ ENTRY(vfork)
.L_failure:
neg a0, a0
j __set_errno_internal
tail __set_errno_internal
END(vfork)