From c4205f830532c2680ead741b0e9a3f9e9663ad76 Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Sun, 7 Jan 2024 02:14:28 -0800 Subject: [PATCH] Remove lingering dlopen thunk --- libc/dlopen/dlopen.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libc/dlopen/dlopen.c b/libc/dlopen/dlopen.c index ae85f5bcb..4263e6e55 100644 --- a/libc/dlopen/dlopen.c +++ b/libc/dlopen/dlopen.c @@ -722,14 +722,13 @@ static void *dlopen_nt(const char *path, int mode) { static void *dlsym_nt(void *handle, const char *name) { void *x64_abi_func; - void *sysv_abi_func = 0; if ((x64_abi_func = GetProcAddress((uintptr_t)handle, name))) { - sysv_abi_func = foreign_thunk_nt(x64_abi_func); + return x64_abi_func; } else { dlerror_set("symbol not found: "); strlcat(dlerror_buf, name, sizeof(dlerror_buf)); + return 0; } - return sysv_abi_func; } static void *dlopen_silicon(const char *path, int mode) {