From: Geoff Norton Date: Tue, 1 Jun 2010 00:39:19 +0000 (+0000) Subject: 2010-05-31 Geoff Norton X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e9ac0c5fb87e42871b8bfb0a0b9dff89166770e1;p=gc 2010-05-31 Geoff Norton * 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 --- diff --git a/ChangeLog b/ChangeLog index 114a3b27..de4da8da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-05-31 Geoff Norton + + * dyn_load.c: Its possible for linkmap->l_addr to be null for the + linker entry on some systems (Android/Bionic based libc's) + 2010-04-23 Geoff Norton * include/private/gcconfig.h: Darwin x86-64 bit support. diff --git a/dyn_load.c b/dyn_load.c index a6e33163..63f64624 100644 --- a/dyn_load.c +++ b/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++)) ) {