* autoload.h: Put each info block in its own dummy static function.

This commit is contained in:
Christopher Faylor 2000-06-01 05:41:21 +00:00
parent fcc4976d26
commit b55cc84266
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,7 @@
Thu Jun 1 01:40:20 2000 Christopher Faylor <cgf@cygnus.com>
* autoload.h: Put each info block in its own dummy static function.
2000-05-31 DJ Delorie <dj@cygnus.com>
* include/cygwin/version.h: use decimal, NOT octal

View File

@ -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");