zephyr/scripts/build
Luca Burelli 11c350e2e6 llext: fix handling of unimplemented syscalls
When building an LLEXT-enabled kernel, 62b19ef65c added weak aliases
of all syscall implementation functions to a pointer to NULL, with the
assumption that LLEXT would check the required symbols at link time and
fail if any of them were found.

This check, however, is ineffective in the current implementation: the
actual address that is exported is the rather normal-looking location of
the variable containing the NULL pointer. This defeats the NULL symbol
validity checks in llext_link.c and causes the extension to crash at
runtime by jumping to a location containing a few zeroes in read-only
data memory.

This commit makes sure the alias target is actually placed at address 0
using the llext-sections.ld linker fragment, so that undefined syscall
implementations are exported as NULLs and as such properly flagged at
link time.

The test for this functionality is also updated to reflect the change.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-10-08 16:59:50 +02:00
..
check_init_priorities.py
check_init_priorities_test.py
dir_is_writeable.py
elf_parser.py
file2hex.py
gen_app_partitions.py
gen_cfb_font_header.py
gen_device_deps.py
gen_image_info.py
gen_isr_tables.py
gen_isr_tables_parser_carrays.py
gen_isr_tables_parser_local.py
gen_kobject_list.py
gen_kobject_placeholders.py
gen_offset_header.py
gen_relocate_app.py
gen_strerror_table.py
gen_strsignal_table.py
gen_symtab.py
gen_syscalls.py
llext_inject_slids.py
llext_prepare_exptab.py
llext_slidlib.py
mergehex.py
parse_syscalls.py
process_gperf.py
subfolder_list.py
uf2conv.py
uf2families.json
user_wordsize.py