Skip to content
Commit 45b85bd2 authored by Eric Ackermann's avatar Eric Ackermann Committed by Fabio Baltieri
Browse files

llext: Disable small data sections on RISC-V



On RISC-V, GCC and possibly other compilers include small globals in
special "small data" sections like .sbss and .sdata.
This allows accessing these globals using the global pointer register
and an offset, which is faster than ordinary relocations.
Currently, llext_load does not support multiple NOBIT sections.
Thus, llext's that use both .bss and .sbss sections cannot be relocated.
Also, the global pointer cannot be used in llext's, as it does not
change when calling into or returning from an llext, making the
optimization pointless for llext.
This commit disables the use of small data sections by adding the
appropriate compiler flag when compiling llext's.
In addition to solving the aforementioned issue, this fixes llext's
test_inspect on RISC-V.

Signed-off-by: default avatarEric Ackermann <eric.ackermann@cispa.de>
parent b1584c44
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment