diff --git a/include/zephyr/linker/llext-sections.ld b/include/zephyr/linker/llext-sections.ld index 3dcfc3e8f0cd8..f6344a531298b 100644 --- a/include/zephyr/linker/llext-sections.ld +++ b/include/zephyr/linker/llext-sections.ld @@ -1,12 +1,16 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* - * Map the no_syscall_impl symbol in llext_export_syscalls.c to + * Save the current address to avoid changing it in this file. + */ + HIDDEN(__llext_current_addr = .); + + /* + * Map the 'no_syscall_impl' symbol in 'syscall_export_llext.c' to * absolute address 0 so other weak symbols are exported as NULL. * This section is used for mapping that symbol only and is not * to be included in the final binary. */ - SECTION_PROLOGUE(llext_no_syscall_impl, 0 (COPY), ) { *(llext_no_syscall_impl) @@ -29,3 +33,5 @@ KEEP(*(llext_exports_strtab)) } #endif + + . = __llext_current_addr;