未验证 提交 fad47f04 编写于 作者: O openharmony_ci 提交者: Gitee

!876 Fix libc.a undefined symbol

Merge pull request !876 from 刘雅宁/master
......@@ -149,6 +149,7 @@ template("musl_libs") {
cflags = cflags_all
defines = [ "BROKEN_VFP_ASM" ]
defines += [ "FEATURE_ATEXIT_CB_PROTECT" ]
if (is_standard_system) {
defines += [
"OHOS_DNS_PROXY_BY_NETSYS=1",
......
......@@ -3577,7 +3577,9 @@ static int dlclose_impl(struct dso *p)
}
/* after destruct, invalidate atexit funcs which belong to this dso */
#if (defined(FEATURE_ATEXIT_CB_PROTECT))
invalidate_exit_funcs(p);
#endif
/* remove dso symbols from global list */
if (p->syms_next) {
......
......@@ -76,6 +76,7 @@ int __cxa_atexit(void (*func)(void *), void *arg, void *dso)
if (!head) head = &builtin;
// if called from atexit, check callback ptr mem range.
#if (defined(FEATURE_ATEXIT_CB_PROTECT))
if ((func == (void *)call) && (dso == NULL)) {
p = addr2dso((size_t)arg);
if (p == NULL) {
......@@ -84,6 +85,7 @@ int __cxa_atexit(void (*func)(void *), void *arg, void *dso)
return -1;
}
}
#endif
/* If the current function list is full, add a new one */
if (slot==COUNT) {
......@@ -140,4 +142,4 @@ int invalidate_exit_funcs(struct dso *p)
UNLOCK(lock);
return 0;
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册