From b55cc8426622fef0cb86fe3240e4f132890ddeab Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 1 Jun 2000 05:41:21 +0000 Subject: [PATCH] * autoload.h: Put each info block in its own dummy static function. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/autoload.h | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 1c30b7728..51aa7048d 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +Thu Jun 1 01:40:20 2000 Christopher Faylor + + * autoload.h: Put each info block in its own dummy static function. + 2000-05-31 DJ Delorie * include/cygwin/version.h: use decimal, NOT octal diff --git a/winsup/cygwin/autoload.h b/winsup/cygwin/autoload.h index be5aa164a..9220e24b5 100644 --- a/winsup/cygwin/autoload.h +++ b/winsup/cygwin/autoload.h @@ -65,6 +65,10 @@ static int dllname ## _init () #define LoadDLLmangle(name, n) #name "@" #n #define LoadDLLfunc(name, n, dllname) LoadDLLfuncEx (name, n, dllname, 0) #define LoadDLLfuncEx(name, n, dllname, notimp) \ +extern "C" { \ +static void name##_dummy () __attribute__ ((noreturn)) __attribute__ ((unused)) __attribute__ ((stdcall)); \ +static void name##_dummy () \ +{ \ __asm__ (".section .data_cygwin_nocopy,\"w\""); \ __asm__ (".global _" LoadDLLmangle (name, n)); \ __asm__ (".global _win32_" LoadDLLmangle (name, n)); \ @@ -77,6 +81,8 @@ __asm__ (#name "jump: .long " #dllname "_init_holder"); \ __asm__ (" .long _" #dllname "_handle"); \ __asm__ (" .long " #n "+" #notimp); \ __asm__ (".asciz \"" #name "\""); \ -__asm__ (".text"); +__asm__ (".text"); \ +} \ +} extern "C" void cygwin_dll_func_load () __asm__ ("cygwin_dll_func_load");