linker: Fix LD_PRELOADS for calling constructors

Change-Id: I1eae77a4c59e8a5acc009127d271455bb6fc01b6
This commit is contained in:
Kito Cheng
2012-07-15 00:49:27 +08:00
parent e1d909f71e
commit 326e85eca6

View File

@@ -1649,6 +1649,7 @@ static unsigned __linker_init_post_relocation(unsigned **elfdata)
unsigned *vecs = (unsigned*) (argv + argc + 1);
unsigned *v;
soinfo *si;
int i;
struct link_map * map;
const char *ldpath_env = NULL;
const char *ldpreload_env = NULL;
@@ -1790,6 +1791,10 @@ sanitize:
exit(-1);
}
for(i = 0; preloads[i] != NULL; i++) {
soinfo_call_constructors(preloads[i]);
}
soinfo_call_constructors(si);
#if ALLOW_SYMBOLS_FROM_MAIN