提交 69628e50 编写于 作者: X xiexg-dc

fix stack protector error

fix: #I47UNZ
Signed-off-by: Nxiexg-dc <xiexg@digitalchina.com>
Change-Id: Id860cac12807da1752c25e672cf994e801647814
上级 037b4a58
......@@ -47,6 +47,7 @@ static_library(libc) {
"src/ctype/isxdigit.c",
"src/ctype/tolower.c",
"src/ctype/toupper.c",
"src/env/__stack_chk_fail.c",
"src/errno/strerror.c",
"src/exit/abort.c",
"src/exit/assert.c",
......
#include <string.h>
#include <stdint.h>
#include "pthread_impl.h"
uintptr_t __stack_chk_guard;
void __init_ssp(void *entropy)
{
if (entropy) memcpy(&__stack_chk_guard, entropy, sizeof(uintptr_t));
else __stack_chk_guard = (uintptr_t)&__stack_chk_guard * 1103515245;
}
void __stack_chk_fail(void)
{
*(volatile char *)0=0;
}
hidden void __stack_chk_fail_local(void);
weak_alias(__stack_chk_fail, __stack_chk_fail_local);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册