nuttx-apps/tools
wangjianyu3 7f7ff8c7d4 tools/mksymtab.sh: Support adding additional symbols that are not in undefined list
e.g. For CHRE dynamic nanoapps, pre-saving symbols that may be used later, no need recompiling.

Test: (unique & sorted)
    $ nm ./hello_world.o | grep " U "
             U __aeabi_unwind_cpp_pr1
             U chreGetTime
             U chreGetVersion
             U chreLog
             U __stack_chk_fail
             U __stack_chk_guard

    $ cat additional.txt -n
         1  test_symbol
         2  test_symbol

    $ /PATH/TO/APPS/tools/mksymtab.sh ./hello_world.o MY_PREFIX -a additional.txt
    #include <nuttx/compiler.h>
    #include <nuttx/symtab.h>

    extern void *__aeabi_unwind_cpp_pr1;
    extern void *__stack_chk_fail;
    extern void *__stack_chk_guard;
    extern void *chreGetTime;
    extern void *chreGetVersion;
    extern void *chreLog;
    extern void *test_symbol;

    const struct symtab_s MY_PREFIX_exports[] =
    {
      {"__aeabi_unwind_cpp_pr1", &__aeabi_unwind_cpp_pr1},
      {"__stack_chk_fail", &__stack_chk_fail},
      {"__stack_chk_guard", &__stack_chk_guard},
      {"chreGetTime", &chreGetTime},
      {"chreGetVersion", &chreGetVersion},
      {"chreLog", &chreLog},
      {"test_symbol", &test_symbol},
    };

    const int MY_PREFIX_nexports = sizeof(MY_PREFIX_exports) / sizeof(struct symtab_s);

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 03:46:46 +08:00
..
Wasm tools: New CMake based Wasm build system 2024-03-15 11:15:25 -03:00
bitmap_converter.py Remove unneeded semicolons and parentheses from Python files 2020-12-12 19:20:38 +01:00
check-hash.sh Fix the minor style issue 2022-10-16 19:07:16 +02:00
CMakeLists.txt tools: New CMake based Wasm build system 2024-03-15 11:15:25 -03:00
host_sysinfo.py system/nxdiag: Add Espressif's HAL version 2023-06-29 00:57:53 +08:00
Kconfig Fix Kconfig style 2024-04-09 08:16:40 +02:00
mkimport.sh tools/mkimport.sh: enrich help message 2024-05-09 17:29:39 +08:00
mkkconfig.bat tools: update licenses to Apache 2021-06-10 08:49:24 -05:00
mkkconfig.sh apps/tools:fix build warning. 2023-08-09 13:52:22 +08:00
mkromfsimg.sh add const for romfs_img_len 2024-01-04 09:12:48 -08:00
mksymtab.sh tools/mksymtab.sh: Support adding additional symbols that are not in undefined list 2024-09-19 03:46:46 +08:00
pre-commit tools: add git pre-commit hook for apps 2022-08-14 14:06:10 +03:00
WASI-SDK.defs fix nxstyle 2024-05-15 23:53:05 +08:00
Wasm.mk Wasm.mk: disable by default 2024-01-13 02:16:16 -08:00