Merge "linker: Fix LD_PRELOADS for calling constructors"
This commit is contained in:
commit
f6ee33cee7
@ -1649,6 +1649,7 @@ static unsigned __linker_init_post_relocation(unsigned **elfdata, unsigned linke
|
|||||||
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;
|
||||||
@ -1791,6 +1792,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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user