diff options
author | Nick Kralevich <nnk@google.com> | 2012-07-18 14:02:21 -0700 |
---|---|---|
committer | android code review <noreply-gerritcodereview@google.com> | 2012-07-18 14:02:22 -0700 |
commit | f6ee33cee717f9878d3a43bf76c35547649676d7 (patch) | |
tree | 93d200becc2ae2e17794901b03ff69a5d32b5382 /linker | |
parent | 3fd5e91e58ba40a7321a3f2c4c64970584e9bb56 (diff) | |
parent | 326e85eca6916eb904649f7bff65244a40088ba7 (diff) | |
download | bionic-f6ee33cee717f9878d3a43bf76c35547649676d7.zip bionic-f6ee33cee717f9878d3a43bf76c35547649676d7.tar.gz bionic-f6ee33cee717f9878d3a43bf76c35547649676d7.tar.bz2 |
Merge "linker: Fix LD_PRELOADS for calling constructors"
Diffstat (limited to 'linker')
-rw-r--r-- | linker/linker.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/linker/linker.c b/linker/linker.c index 753ee89..b96e072 100644 --- a/linker/linker.c +++ b/linker/linker.c @@ -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 |