Merge "linker: Fix LD_PRELOADS for calling constructors"

This commit is contained in:
Nick Kralevich 2012-07-18 14:02:21 -07:00 committed by android code review
commit f6ee33cee7

View File

@ -1649,6 +1649,7 @@ static unsigned __linker_init_post_relocation(unsigned **elfdata, unsigned linke
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;
@ -1791,6 +1792,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