From ceb8e32cbc9f6ddd17c5639a721f5314eb1f3acc Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Fri, 20 Jul 2018 13:22:24 +0200 Subject: [PATCH] crypto/dllmain.c: remove unused OPENSSL_NONPIC_relocated variable. Reviewed-by: Kurt Roeckx (Merged from https://github.com/openssl/openssl/pull/6752) --- crypto/cryptlib.c | 1 - crypto/dllmain.c | 15 --------------- include/internal/cryptlib.h | 1 - 3 files changed, 17 deletions(-) diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index a7894ddac3..b1e535a695 100644 --- a/crypto/cryptlib.c +++ b/crypto/cryptlib.c @@ -161,7 +161,6 @@ void OPENSSL_cpuid_setup(void) unsigned int OPENSSL_ia32cap_P[4]; # endif #endif -int OPENSSL_NONPIC_relocated = 0; #if !defined(OPENSSL_CPUID_SETUP) && !defined(OPENSSL_CPUID_OBJ) void OPENSSL_cpuid_setup(void) { diff --git a/crypto/dllmain.c b/crypto/dllmain.c index 81bcb2d054..c23b06b441 100644 --- a/crypto/dllmain.c +++ b/crypto/dllmain.c @@ -31,21 +31,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) switch (fdwReason) { case DLL_PROCESS_ATTACH: OPENSSL_cpuid_setup(); -# if defined(_WIN32_WINNT) - { - IMAGE_DOS_HEADER *dos_header = (IMAGE_DOS_HEADER *) hinstDLL; - IMAGE_NT_HEADERS *nt_headers; - - if (dos_header->e_magic == IMAGE_DOS_SIGNATURE) { - nt_headers = (IMAGE_NT_HEADERS *) ((char *)dos_header - + dos_header->e_lfanew); - if (nt_headers->Signature == IMAGE_NT_SIGNATURE && - hinstDLL != - (HINSTANCE) (nt_headers->OptionalHeader.ImageBase)) - OPENSSL_NONPIC_relocated = 1; - } - } -# endif break; case DLL_THREAD_ATTACH: break; diff --git a/include/internal/cryptlib.h b/include/internal/cryptlib.h index 2808fe7eea..a608735187 100644 --- a/include/internal/cryptlib.h +++ b/include/internal/cryptlib.h @@ -78,7 +78,6 @@ DEFINE_LHASH_OF(MEM); void OPENSSL_cpuid_setup(void); extern unsigned int OPENSSL_ia32cap_P[]; void OPENSSL_showfatal(const char *fmta, ...); -extern int OPENSSL_NONPIC_relocated; void crypto_cleanup_all_ex_data_int(void); int openssl_init_fork_handlers(void); -- GitLab