From b7d59b10abe3c17cfb8ff02ba1333b88610d67c9 Mon Sep 17 00:00:00 2001 From: shuxinyiA Date: Mon, 23 May 2022 11:34:53 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20a7f050f=20from=20https://gitee.com/shux?= =?UTF-8?q?inyia/third=5Fparty=5Fmusl/pulls/302=20=20native=20hook=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9musl=20=E5=BD=B1=E5=93=8D=E4=BA=86=E6=80=A7?= =?UTF-8?q?=E8=83=BD=20=20Signed-off-by:=20shuxinyiA=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shuxinyiA --- porting/linux/user/src/hook/musl_preinit.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/porting/linux/user/src/hook/musl_preinit.c b/porting/linux/user/src/hook/musl_preinit.c index c719ac02..ac20cc74 100644 --- a/porting/linux/user/src/hook/musl_preinit.c +++ b/porting/linux/user/src/hook/musl_preinit.c @@ -378,23 +378,6 @@ __attribute__((constructor(1))) static void __musl_initialize() atomic_store_explicit(&__hook_enable_hook_flag, (volatile bool)false, memory_order_seq_cst); __set_default_malloc(); //__init_musl_log(); - parse_hook_variable(&__hook_mode, __hook_process_path, sizeof(__hook_process_path)); - if (__hook_mode == STATRUP_HOOK_MODE) { - readlink("/proc/self/exe", __progname, sizeof(__progname) - 1); - const char *pos = strrchr(__progname, '/'); - const char* filename; - if (pos) { - filename = pos + 1; - } else { - filename = __progname; - } - if (strcmp(filename, __hook_process_path) == 0) { - atomic_store_explicit(&__hook_enable_hook_flag, (volatile bool)true, memory_order_seq_cst); - init_ohos_malloc_hook(); - } else { - __hook_mode = STEP_HOOK_MODE; - } - } __initialize_malloc(); } #endif -- GitLab