Can not compile a project using app.mk (e.g. zknAes). The linker output the following error:
/usr/lib/gcc/riscv64-elf/15.2.0/../../../../riscv64-elf/bin/ld: warning: build/zknAes.elf has a LOAD segment with RWX permissions
/usr/lib/gcc/riscv64-elf/15.2.0/../../../../riscv64-elf/lib/libc.a(libc_a-puts.o): in function `_puts_r':
/build/riscv64-elf-newlib/src/build-newlib/riscv64-elf/newlib/../../../newlib-4.6.0.20260123/newlib/libc/stdio/puts.c:73:(.text._puts_r+0x12): relocation truncated to fit: R_RISCV_HI20 against `.LC0'
/usr/lib/gcc/riscv64-elf/15.2.0/../../../../riscv64-elf/lib/libc.a(libc_a-init.o): in function `__libc_init_array':
/build/riscv64-elf-newlib/src/build-newlib/riscv64-elf/newlib/../../../newlib-4.6.0.20260123/newlib/libc/misc/init.c:36:(.text.__libc_init_array+0x6): relocation truncated to fit: R_RISCV_HI20 against symbol `__preinit_array_start' defined in .text section in build/zknAes.elf
/usr/lib/gcc/riscv64-elf/15.2.0/../../../../riscv64-elf/lib/libc.a(libc_a-findfp.o): in function `stdio_exit_handler':
/build/riscv64-elf-newlib/src/build-newlib/riscv64-elf/newlib/../../../newlib-4.6.0.20260123/newlib/libc/stdio/findfp.c:155:(.text.stdio_exit_handler+0x0): relocation truncated to fit: R_RISCV_HI20 against symbol `__sglue' defined in .data.__sglue section in /usr/lib/gcc/riscv64-elf/15.2.0/../../../../riscv64-elf/lib/libc.a(libc_a-findfp.o)
/build/riscv64-elf-newlib/src/build-newlib/riscv64-elf/newlib/../../../newlib-4.6.0.20260123/newlib/libc/stdio/findfp.c:155:(.text.cleanup_stdio+0x4): relocation truncated to fit: R_RISCV_HI20 against symbol `__sf' defined in .bss.__sf section in /usr/lib/gcc/riscv64-elf/15.2.0/../../../../riscv64-elf/lib/libc.a(libc_a-findfp.o)
/usr/lib/gcc/riscv64-elf/15.2.0/../../../../riscv64-elf/lib/libc.a(libc_a-findfp.o): in function `__fp_unlock':
/build/riscv64-elf-newlib/src/build-newlib/riscv64-elf/newlib/../../../newlib-4.6.0.20260123/newlib/libc/stdio/findfp.c:296:(.text.global_stdio_init.part.0+0x2): relocation truncated to fit: R_RISCV_HI20 against `stdio_exit_handler'
/usr/lib/gcc/riscv64-elf/15.2.0/../../../../riscv64-elf/lib/libc.a(libc_a-findfp.o): in function `__sfp_lock_acquire':
/build/riscv64-elf-newlib/src/build-newlib/riscv64-elf/newlib/../../../newlib-4.6.0.20260123/newlib/libc/stdio/findfp.c:87:(.text.__sfp+0x1a): relocation truncated to fit: R_RISCV_HI20 against symbol `__sglue' defined in .data.__sglue section in /usr/lib/gcc/riscv64-elf/15.2.0/../../../../riscv64-elf/lib/libc.a(libc_a-findfp.o)
/build/riscv64-elf-newlib/src/build-newlib/riscv64-elf/newlib/../../../newlib-4.6.0.20260123/newlib/libc/stdio/findfp.c:275:(.text.__sinit+0x16): relocation truncated to fit: R_RISCV_HI20 against `cleanup_stdio'
/usr/lib/gcc/riscv64-elf/15.2.0/../../../../riscv64-elf/lib/libc.a(libc_a-findfp.o): in function `__sfp_lock_release':
/build/riscv64-elf-newlib/src/build-newlib/riscv64-elf/newlib/../../../newlib-4.6.0.20260123/newlib/libc/stdio/findfp.c:275:(.text.__fp_lock_all+0xe): relocation truncated to fit: R_RISCV_HI20 against symbol `__sglue' defined in .data.__sglue section in /usr/lib/gcc/riscv64-elf/15.2.0/../../../../riscv64-elf/lib/libc.a(libc_a-findfp.o)
/usr/lib/gcc/riscv64-elf/15.2.0/../../../../riscv64-elf/lib/libc.a(libc_a-findfp.o): in function `__fp_lock_all':
/build/riscv64-elf-newlib/src/build-newlib/riscv64-elf/newlib/../../../newlib-4.6.0.20260123/newlib/libc/stdio/findfp.c:302:(.text.__fp_unlock_all+0x0): relocation truncated to fit: R_RISCV_HI20 against symbol `__sglue' defined in .data.__sglue section in /usr/lib/gcc/riscv64-elf/15.2.0/../../../../riscv64-elf/lib/libc.a(libc_a-findfp.o)
/usr/lib/gcc/riscv64-elf/15.2.0/../../../../riscv64-elf/lib/libc.a(libc_a-memchr.o): in function `memchr':
/build/riscv64-elf-newlib/src/build-newlib/riscv64-elf/newlib/../../../newlib-4.6.0.20260123/newlib/libc/machine/riscv/memchr.c:61:(.text.memchr+0x1a): relocation truncated to fit: R_RISCV_HI20 against `.L6'
/usr/lib/gcc/riscv64-elf/15.2.0/../../../../riscv64-elf/lib/libc.a(libc_a-freer.o): in function `_malloc_trim_r':
/build/riscv64-elf-newlib/src/build-newlib/riscv64-elf/newlib/../../../newlib-4.6.0.20260123/newlib/libc/stdlib/_mallocr.c:3340:(.text._malloc_trim_r+0x4): additional relocation overflows omitted from the output
This can be solved by removing MEMORY section in the link script. But I am not sure what happens to this.
Can not compile a project using app.mk (e.g. zknAes). The linker output the following error:
This can be solved by removing
MEMORYsection in the link script. But I am not sure what happens to this.