submitted-rld_map
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Sat, 2 Oct 2021 12:47:40 +0000 (13:47 +0100)
committerAurelien Jarno <aurel32@debian.org>
Sat, 2 Oct 2021 12:47:40 +0000 (13:47 +0100)
2010-05-20  Aurelien Jarno  <aurelien@aurel32.net>

* sysdeps/mips/dl-machine.h (ELF_MACHINE_DEBUG_SETUP): test for
RLD_MAP pointer before using it.

Gbp-Pq: Topic mips
Gbp-Pq: Name submitted-rld_map.diff

sysdeps/mips/dl-machine.h

index 06021ea9abcfcc598b2204ce37d643a4809735da..e5eaf0e75b5114525b64008937d904bc9cf8540f 100644 (file)
@@ -78,7 +78,8 @@ do { if ((l)->l_info[DT_MIPS (RLD_MAP_REL)]) \
         ptr += (l)->l_info[DT_MIPS (RLD_MAP_REL)]->d_un.d_val; \
         *(ElfW(Addr) *)ptr = (ElfW(Addr)) (r); \
        } \
-     else if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
+     else if ((l)->l_info[DT_MIPS (RLD_MAP)] && \
+        (l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) \
        *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \
        (ElfW(Addr)) (r); \
    } while (0)