From: Gary V. Vaughan Date: Mon, 15 Feb 1999 14:21:10 +0000 (+0000) Subject: * demo/dlmain.c (_WIN32): The lt_symlist structure is now const, X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b25378c96d9e574f2b6ebf87e692d71b9656d2cf;p=thirdparty%2Flibtool.git * demo/dlmain.c (_WIN32): The lt_symlist structure is now const, so my original horrible temporary win32 hack no longer worked. Here is a new horrible temporary hack to prevent helldl from SEGVing on win32. I will fix this properly when we figure out how to do data exports from dlls. --- diff --git a/ChangeLog b/ChangeLog index d15229bda..1b3822786 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +1999-02-15 Gary V. Vaughan + + * demo/dlmain.c (_WIN32): The lt_symlist structure is now const, + so my original horrible temporary win32 hack no longer worked. + Here is a new horrible temporary hack to prevent helldl from SEGVing + on win32. I will fix this properly when we figure out how to do + data exports from dlls. + 1999-02-13 Thomas Tanner * syncronized with HEAD diff --git a/demo/dlmain.c b/demo/dlmain.c index 32c8c6e0f..2af03f449 100644 --- a/demo/dlmain.c +++ b/demo/dlmain.c @@ -32,25 +32,6 @@ struct lt_symlist extern const struct lt_symlist lt_preloaded_symbols[]; -#ifdef __CYGWIN32__ -int -win32_force_data_import_address __P((void)) -{ - const struct lt_symlist *s; - - s = lt_preloaded_symbols; - while (s->name) - { - if (!strcmp ("nothing", s->name)) - s->address = ¬hing; - s++; - } - - return 0; -} -#endif - - int main (argc, argv) int argc; @@ -63,11 +44,6 @@ main (argc, argv) printf ("Welcome to *modular* GNU Hell!\n"); -#ifdef __CYGWIN32__ - /* runtime table initialisation */ - (void) win32_force_data_import_address(); -#endif - /* Look up the symbols we require for this demonstration. */ s = lt_preloaded_symbols; while (s->name) @@ -80,7 +56,14 @@ main (argc, argv) else if (!strcmp ("foo", name)) pfoo = (int(*)())s->address; else if (!strcmp ("nothing", name)) +#ifndef _WIN32 + /* In an ideal world we could do this... */ pnothing = (int*)s->address; +#else /* !_WIN32 */ + /* In an ideal world a shared lib would be able to export data */ + pnothing = (int*)¬hing; +#endif + } else printf ("found file: %s\n", s->name); s ++;