Mark _DYNAMIC to have attribute __weakref__, so that gcc-4 does not optimize
&_DYNAMIC == NULL away. From Matt Thomas.
This commit is contained in:
parent
f32828209d
commit
e08e654f06
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: common.h,v 1.10 2004/08/26 20:57:47 thorpej Exp $ */
|
||||
/* $NetBSD: common.h,v 1.11 2006/05/17 17:08:07 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Christopher G. Demetriou
|
||||
@ -81,7 +81,11 @@ void _rtld_setup(void (*)(void), const Obj_Entry *obj);
|
||||
* if we happen to be compiling without -static but with without any
|
||||
* shared libs present, things will still work.
|
||||
*/
|
||||
extern int _DYNAMIC;
|
||||
extern int _DYNAMIC
|
||||
#if __GNUC__ > 3
|
||||
__attribute__((__weakref__))
|
||||
#endif
|
||||
;
|
||||
__weak_extern(_DYNAMIC);
|
||||
#endif /* DYNAMIC */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user