2010-05-31 Geoff Norton <gnorton@novell.com>
authorGeoff Norton <grompf@sublimeintervention.com>
Tue, 1 Jun 2010 00:39:19 +0000 (00:39 -0000)
committerGeoff Norton <grompf@sublimeintervention.com>
Tue, 1 Jun 2010 00:39:19 +0000 (00:39 -0000)
* 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

libgc/ChangeLog
libgc/dyn_load.c

index 114a3b27551cc3e680cbccce59a7238950e25b93..de4da8dae6c9ebba35fbd37b9958df528799d32e 100644 (file)
@@ -1,3 +1,8 @@
+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)
+
 2010-04-23  Geoff Norton  <gnorton@novell.com>
 
        * include/private/gcconfig.h: Darwin x86-64 bit support.
index a6e33163dfdf2cb9bf09fcf1d7067d199949ba8b..63f646244a5e093f978619da225e67b876467c6b 100644 (file)
@@ -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++)) ) {