[patch] init_array/fini_array support
Joakim Tjernlund
joakim.tjernlund at transmode.se
Thu Feb 2 13:08:46 UTC 2006
>
> From: Joakim Tjernlund [mailto:joakim.tjernlund at transmode.se]
> >if (__builtin_expect (GLRO(dl_dynamic_weak), 0))
> >This is only true if you set env. var. LD_DYNAMIC_WEAK=1
> >
> >You can change the weak behaviour dynamically, but the default
> >is NOT to prefer a strong definition over a weak.
>
> In dl-support.c:
>
> _dl_dynamic_weak = *(getenv ("LD_DYNAMIC_WEAK") ?: "") == '\0'
This will set _dl_dynamic_weak 1 if LD_DYNAMIC_WEAK is undefined,
but I think dl-support.c is used for static builds.
For dynamic bulids the code is in rtld.c:
if (!INTUSE(__libc_enable_secure)
&& memcmp (envline, "DYNAMIC_WEAK", 12) == 0)
GLRO(dl_dynamic_weak) = 1;
This will set dl_dynamic_weak to 1 if LD_DYNAMIC_WEAK is defined.
Jocke
More information about the uClibc
mailing list