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

re #I4XQC1

Signed-off-by: x_xiny <1301913191@qq.com>
Change-Id: I79a59e70ddaba746a50bd92aea647778c4e90a0c
This commit is contained in:
x_xiny 2022-06-23 17:31:57 +08:00
parent 8a05eb6e08
commit 3df936f1a1
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 \
};