New features for tools/mksymtab.sh#2581
Merged
xiaoxiang781216 merged 4 commits intoapache:masterfrom Sep 18, 2024
Merged
Conversation
…dynamic modules in bin/ call each other. Signed-off-by: anjiahao <anjiahao@xiaomi.com>
sed: -e expression apache#1, char 0: no previous regular expression Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
…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>
The lines start with "," make no effects(as comments)
e.g.
$ cat exports.txt | grep atan2
atan2Override,atan2
$ /PATH/TO/APPS/tools/mksymtab.sh FOO BAR exports.txt | grep atan2
extern void *atan2Override;
{"atan2", &atan2Override},
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Impact
Build scripts that using mksymtab.sh to generate symbol tables.
Testing