summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/valgrind/valgrind-3.7.0/valgrind-3.7.0-fix-error-of-reading-debug-info.patch
blob: b1626f0b0f1feaa4e08c3e415c968685164b3d77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Upstream-Status: Pending

fix debug info reading error when do memcheck on ppc targets
    following is the error message:
        --2263-- WARNING: Serious error when reading debug info
        --2263-- When reading debug info from /lib/ld-2.13.so:
        --2263-- Can't make sense of .got section mapping
        --2263-- WARNING: Serious error when reading debug info
        --2263-- When reading debug info from /home/root/lzh:
        --2263-- Can't make sense of .data section mapping
        --2263-- WARNING: Serious error when reading debug info
        --2263-- When reading debug info from /usr/lib/valgrind/vgpreload_core-ppc32-linux.so:
        --2263-- Can't make sense of .data section mapping
        --2263-- WARNING: Serious error when reading debug info
        --2263-- When reading debug info from /usr/lib/valgrind/vgpreload_memcheck-ppc32-linux.so:
        --2263-- Can't make sense of .data section mapping
        --2263-- WARNING: Serious error when reading debug info
        --2263-- When reading debug info from /lib/libc-2.13.so:
        --2263-- Can't make sense of .data section mapping

Signed-off-by: Zhenhua Luo <b19537@freescale.com>

--- a/coregrind/m_debuginfo/readelf.c	2012-09-11 21:45:36.696462313 -0500
+++ b/coregrind/m_debuginfo/readelf.c	2012-09-11 21:45:49.913463615 -0500
@@ -1539,7 +1539,7 @@
                 && phdr->p_offset < di->fsm.rw_map_foff + di->fsm.rw_map_size
                 && phdr->p_offset + phdr->p_filesz 
                    <= di->fsm.rw_map_foff + di->fsm.rw_map_size
-                && (phdr->p_flags & (PF_R | PF_W | PF_X)) == (PF_R | PF_W)) {
+                && (phdr->p_flags & (PF_R | PF_W | PF_X)) >= (PF_R | PF_W)) {
                if (n_rw == N_RX_RW_AREAS) {
                   ML_(symerr)(di, True,
                               "N_RX_RW_AREAS is too low; "