!729 禁止导出符号被编译器优化掉

Merge pull request !729 from xuxinyu/master
This commit is contained in:
openharmony_ci 2022-06-23 11:17:05 +00:00 committed by Gitee
commit 8cfadb9b4d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -134,7 +134,7 @@ typedef struct {
} SymInfo;
#define SYM_EXPORT(func) \
const SymInfo sym_##func __attribute__((section(".sym."#func))) = { \
const SymInfo sym_##func __attribute__((__used__, section(".sym."#func))) = { \
.name = #func, \
.addr = (UINTPTR)func \
};