diff options
author | Geoff Norton <grompf@sublimeintervention.com> | 2010-06-01 04:39:19 +0400 |
---|---|---|
committer | Geoff Norton <grompf@sublimeintervention.com> | 2010-06-01 04:39:19 +0400 |
commit | d09ffbad97bb0ef4c0f7446d0dfc331c7f26aa74 (patch) | |
tree | dceab4921ef3d49e9a14b600fb4b93920c9a3b4b /libgc/dyn_load.c | |
parent | 76f80e036ced2c8cdca6169b82e7b7b071ac58ab (diff) |
2010-05-31 Geoff Norton <gnorton@novell.com>
* dyn_load.c: Its possible for linkmap->l_addr to be null for the
linker entry on some systems (Android/Bionic based libc's)
svn path=/trunk/mono/; revision=158239
Diffstat (limited to 'libgc/dyn_load.c')
-rw-r--r-- | libgc/dyn_load.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libgc/dyn_load.c b/libgc/dyn_load.c index a6e33163dfd..63f646244a5 100644 --- a/libgc/dyn_load.c +++ b/libgc/dyn_load.c @@ -544,7 +544,10 @@ void GC_register_dynamic_libraries() char * start; register int i; - e = (ElfW(Ehdr) *) lm->l_addr; + e = (ElfW(Ehdr) *) lm->l_addr; + if (e == NULL) + continue; + p = ((ElfW(Phdr) *)(((char *)(e)) + e->e_phoff)); offset = ((unsigned long)(lm->l_addr)); for( i = 0; i < (int)(e->e_phnum); ((i++),(p++)) ) { |