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 scripts: build: check_init_priorities: remove obsolete code 2024-10-02 09:49:53 +02:00
check_init_priorities_test.py scripts: build: check_init_priorities: remove obsolete code 2024-10-02 09:49:53 +02:00
dir_is_writeable.py
elf_parser.py scripts/build/elf_parser.py: make dependency graph output deterministic 2023-12-04 14:24:32 +01:00
file2hex.py
gen_app_partitions.py
gen_cfb_font_header.py
gen_device_deps.py
gen_image_info.py
gen_isr_tables.py script: gen_isr_tables: remove unnecessary warning log 2024-02-26 11:55:59 +00:00
gen_isr_tables_parser_carrays.py scripts: build: gen_isr_tables: Implement local ISR generation 2024-02-02 19:49:36 +01:00
gen_isr_tables_parser_local.py scripts: build: gen_isr_tables: Implement local ISR generation 2024-02-02 19:49:36 +01:00
gen_kobject_list.py scripts: build: gen_kobject_list.py check _driver_api suffix 2024-05-03 14:44:41 +01:00
gen_kobject_placeholders.py
gen_offset_header.py
gen_relocate_app.py code_relocation: Add NOKEEP option 2024-01-15 13:20:17 +01:00
gen_strerror_table.py
gen_strsignal_table.py
gen_symtab.py debug: symtab: fix linking issue due to variable redefinition 2024-05-30 16:52:01 -05:00
gen_syscalls.py llext: fix handling of unimplemented syscalls 2024-10-08 16:59:50 +02:00
llext_inject_slids.py llext: add support for SLID-based linking 2024-06-03 15:29:34 -04:00
llext_prepare_exptab.py llext: add support for SLID-based linking 2024-06-03 15:29:34 -04:00
llext_slidlib.py llext: add support for SLID-based linking 2024-06-03 15:29:34 -04:00
mergehex.py
parse_syscalls.py scripts/build: make struct_tags.json deterministic 2023-12-11 09:51:22 +01:00
process_gperf.py syscall: rename z_object_find -> k_object_find 2023-11-03 11:46:52 +01:00
subfolder_list.py everywhere: replace double words 2024-06-25 06:05:35 -04:00
uf2conv.py scripts: Update uf2conv.py from upstream git. 2024-05-08 09:31:07 -04:00
uf2families.json scripts: Update uf2conv.py from upstream git. 2024-05-08 09:31:07 -04:00
user_wordsize.py