You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have an embedded project that groups different functions into different custom sections. If I have function A in a custom section .ram_code that references another function B in the same section (through inline asm in my case), then the reference to B instead refers to the jumptable entry for B. This jump table is placed in .text.B. The linker script used for this project places .text very far away from .ram_code leading to relocation R_RISCV_JAL out of range.
I think the fix emitting jump tables per section in addition to per function type such that jump tables for functions in unique sections are in the same sections as those functions.
The text was updated successfully, but these errors were encountered:
That would make indirect calls more expensive because now every call would need to check for the function in both jump tables.
How do long range calls normally work in RISC-V? While I was looking at lld for an unrelated reason it didn't seem like there was anything like range extension thunks, maybe that needs to be implemented?
Also once #138366 lands (and a RISC-V implementation is added) we should usually be able to avoid these long range branches anyway.
We have an embedded project that groups different functions into different custom sections. If I have function
A
in a custom section.ram_code
that references another functionB
in the same section (through inline asm in my case), then the reference toB
instead refers to the jumptable entry forB
. This jump table is placed in.text.B
. The linker script used for this project places.text
very far away from.ram_code
leading torelocation R_RISCV_JAL out of range
.I think the fix emitting jump tables per section in addition to per function type such that jump tables for functions in unique sections are in the same sections as those functions.
The text was updated successfully, but these errors were encountered: