linker: Fix LD_PRELOADS for calling constructors
Change-Id: I1eae77a4c59e8a5acc009127d271455bb6fc01b6
This commit is contained in:
@@ -1649,6 +1649,7 @@ static unsigned __linker_init_post_relocation(unsigned **elfdata)
|
|||||||
unsigned *vecs = (unsigned*) (argv + argc + 1);
|
unsigned *vecs = (unsigned*) (argv + argc + 1);
|
||||||
unsigned *v;
|
unsigned *v;
|
||||||
soinfo *si;
|
soinfo *si;
|
||||||
|
int i;
|
||||||
struct link_map * map;
|
struct link_map * map;
|
||||||
const char *ldpath_env = NULL;
|
const char *ldpath_env = NULL;
|
||||||
const char *ldpreload_env = NULL;
|
const char *ldpreload_env = NULL;
|
||||||
@@ -1790,6 +1791,10 @@ sanitize:
|
|||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(i = 0; preloads[i] != NULL; i++) {
|
||||||
|
soinfo_call_constructors(preloads[i]);
|
||||||
|
}
|
||||||
|
|
||||||
soinfo_call_constructors(si);
|
soinfo_call_constructors(si);
|
||||||
|
|
||||||
#if ALLOW_SYMBOLS_FROM_MAIN
|
#if ALLOW_SYMBOLS_FROM_MAIN
|
||||||
|
Reference in New Issue
Block a user