zephyr/scripts/build
Luca Burelli 78ae035f89 llext: fix link order for weak syscall symbols
The weak syscall symbols generated by gen_syscalls.py are currently
compiled in the LLEXT subsystem library, which is then linked among all
other Zephyr libraries in an unspecified order. This can cause the weak
symbols to override the actual syscall implementations, leading to
undefined behaviour.

To fix this, the currently generated file is split in two elements:

- syscall_exports_llext.c contains the EXPORT_SYMBOL directives for all
  syscalls. This part can be compiled with the LLEXT library and linked
  among all other Zephyr libraries, and ensures all syscalls symbols
  are preserved by the linker.

- syscall_weakdefs_llext.c contains the weak definitions for all syscalls.
  This file is compiled in a separate library that is linked last, so
  that the weak symbols are only used if no other implementation is
  available.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-12-10 20:38:48 +01: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 python: Format trivial files where only newlines were missing 2024-11-21 20:10:51 +01:00
elf_parser.py scripts/build/elf_parser.py: make dependency graph output deterministic 2023-12-04 14:24:32 +01:00
file2hex.py scripts: build: file2hex: Add optional offset and length parameters 2023-09-15 13:23:30 +02:00
gen_app_partitions.py scripts: build: gen_app_partitions: enquote archive name wildcards 2024-12-05 09:41:28 +01:00
gen_cfb_font_header.py scripts: Update CFB font generator 2023-09-13 14:40:00 -07:00
gen_device_deps.py scripts: build: gen_device_deps: s/--dynamic-handles/--dynamic-deps 2023-06-21 09:32:05 +02:00
gen_image_info.py treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
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_iter_sections.py device: export CMake pre-load from device subsystem enumeration script 2024-11-27 08:15:22 +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 treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
gen_offset_header.py treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
gen_relocate_app.py code_relocation: Add NOKEEP option 2024-01-15 13:20:17 +01:00
gen_strerror_table.py treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
gen_strsignal_table.py posix: signal: implement strsignal 2023-07-18 15:35:42 -04:00
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 link order for weak syscall symbols 2024-12-10 20:38:48 +01: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 python: Format trivial files where only newlines were missing 2024-11-21 20:10:51 +01:00
mergehex.py treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
parse_syscalls.py scripts: print the file name when decode syscall 2024-10-30 14:30:55 -05:00
process_gperf.py scripts: process_gperf: upgrade the asso_values type to unsigned short 2024-11-27 06:57:23 -05: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 python: Format trivial files where only newlines were missing 2024-11-21 20:10:51 +01:00