From: Geoff Norton Date: Tue, 1 Jun 2010 00:39:19 +0000 (-0000) Subject: 2010-05-31 Geoff Norton X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=d09ffbad97bb0ef4c0f7446d0dfc331c7f26aa74;p=mono.git 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/libgc/ChangeLog b/libgc/ChangeLog index 114a3b27551..de4da8dae6c 100644 --- a/libgc/ChangeLog +++ b/libgc/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/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++)) ) {