Make it possible to link Wine statically (at least on RedHat 6.0).

oldstable
Pavel Roskin 1999-06-05 11:44:46 +00:00 committed by Alexandre Julliard
parent dfed208e90
commit 1fe9eb1bfb
1 changed files with 7 additions and 2 deletions

View File

@ -1175,7 +1175,11 @@ DEBUG_ReadExecutableDbgInfo(void)
Elf32_Dyn * dynpnt;
struct r_debug * dbg_hdr;
struct link_map * lpnt = NULL;
#ifdef __GNUC__
extern Elf32_Dyn _DYNAMIC[] __attribute__ ((weak));
#else
extern Elf32_Dyn _DYNAMIC[];
#endif
int rtn = FALSE;
int rowcount;
@ -1196,10 +1200,11 @@ DEBUG_ReadExecutableDbgInfo(void)
* of the other shared libraries which might be loaded. Perform the
* same step for all of these.
*/
dynpnt = _DYNAMIC;
if( dynpnt == NULL )
if( (&_DYNAMIC == NULL) || (_DYNAMIC == NULL) )
goto leave;
dynpnt = _DYNAMIC;
/*
* Now walk the dynamic section (of the executable, looking for a DT_DEBUG
* entry.