提交 4adc80a6 编写于 作者: Y yinchuang

remove dl_strcmp and ld_log_reset in dlsym

Signed-off-by: Nyinchuang <yinchuang@huawei.com>
上级 de85c449
...@@ -413,13 +413,6 @@ static void init_namespace(struct dso *app) ...@@ -413,13 +413,6 @@ static void init_namespace(struct dso *app)
return; return;
} }
static int dl_strcmp(const char *l, const char *r)
{
for (; *l==*r && *l; l++, r++);
return *(unsigned char *)l - *(unsigned char *)r;
}
#define strcmp(l,r) dl_strcmp(l,r)
/* Compute load address for a virtual address in a given dso. */ /* Compute load address for a virtual address in a given dso. */
#if DL_FDPIC #if DL_FDPIC
static void *laddr(const struct dso *p, size_t v) static void *laddr(const struct dso *p, size_t v)
...@@ -2480,7 +2473,6 @@ void __dls3(size_t *sp, size_t *auxv) ...@@ -2480,7 +2473,6 @@ void __dls3(size_t *sp, size_t *auxv)
#ifdef OHOS_ENABLE_PARAMETER #ifdef OHOS_ENABLE_PARAMETER
InitParameterClient(); InitParameterClient();
#endif #endif
ld_log_reset();
/* If the main program was already loaded by the kernel, /* If the main program was already loaded by the kernel,
* AT_PHDR will point to some location other than the dynamic * AT_PHDR will point to some location other than the dynamic
* linker's program headers. */ * linker's program headers. */
...@@ -3531,7 +3523,6 @@ int dladdr(const void *addr_arg, Dl_info *info) ...@@ -3531,7 +3523,6 @@ int dladdr(const void *addr_arg, Dl_info *info)
hidden void *__dlsym(void *restrict p, const char *restrict s, void *restrict ra) hidden void *__dlsym(void *restrict p, const char *restrict s, void *restrict ra)
{ {
void *res; void *res;
ld_log_reset();
pthread_rwlock_rdlock(&lock); pthread_rwlock_rdlock(&lock);
#ifdef HANDLE_RANDOMIZATION #ifdef HANDLE_RANDOMIZATION
if ((p != RTLD_DEFAULT) && (p != RTLD_NEXT)) { if ((p != RTLD_DEFAULT) && (p != RTLD_NEXT)) {
...@@ -3554,7 +3545,6 @@ hidden void *__dlsym(void *restrict p, const char *restrict s, void *restrict ra ...@@ -3554,7 +3545,6 @@ hidden void *__dlsym(void *restrict p, const char *restrict s, void *restrict ra
hidden void *__dlvsym(void *restrict p, const char *restrict s, const char *restrict v, void *restrict ra) hidden void *__dlvsym(void *restrict p, const char *restrict s, const char *restrict v, void *restrict ra)
{ {
void *res; void *res;
ld_log_reset();
pthread_rwlock_rdlock(&lock); pthread_rwlock_rdlock(&lock);
#ifdef HANDLE_RANDOMIZATION #ifdef HANDLE_RANDOMIZATION
if ((p != RTLD_DEFAULT) && (p != RTLD_NEXT)) { if ((p != RTLD_DEFAULT) && (p != RTLD_NEXT)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册