Patchwork valgrind: fix debug info reading error when do memcheck on ppc targets

login
register
mail settings
Submitter Zhenhua Luo
Date Sept. 12, 2012, 3:44 a.m.
Message ID <1347421458-2044-1-git-send-email-b19537@freescale.com>
Download mbox | patch
Permalink /patch/36389/
State Superseded
Headers show

Comments

Zhenhua Luo - Sept. 12, 2012, 3:44 a.m.
From: Zhenhua Luo <b19537@freescale.com>

    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>
---
 ...ind-3.7.0-fix-error-of-reading-debug-info.patch |   11 +++++++++++
 meta/recipes-devtools/valgrind/valgrind_3.7.0.bb   |    5 ++++-
 2 files changed, 15 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/valgrind/valgrind-3.7.0/valgrind-3.7.0-fix-error-of-reading-debug-info.patch
McClintock Matthew-B29882 - Sept. 12, 2012, 4:02 a.m.
On Tue, Sep 11, 2012 at 10:44 PM,  <b19537@freescale.com> wrote:
> From: Zhenhua Luo <b19537@freescale.com>
>
>     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>
> ---
>  ...ind-3.7.0-fix-error-of-reading-debug-info.patch |   11 +++++++++++
>  meta/recipes-devtools/valgrind/valgrind_3.7.0.bb   |    5 ++++-
>  2 files changed, 15 insertions(+), 1 deletion(-)
>  create mode 100644 meta/recipes-devtools/valgrind/valgrind-3.7.0/valgrind-3.7.0-fix-error-of-reading-debug-info.patch
>
> diff --git a/meta/recipes-devtools/valgrind/valgrind-3.7.0/valgrind-3.7.0-fix-error-of-reading-debug-info.patch b/meta/recipes-devtools/valgrind/valgrind-3.7.0/valgrind-3.7.0-fix-error-of-reading-debug-info.patch

Patch needs Upstream-Status:

-M

> new file mode 100644
> index 0000000..c3ebd67
> --- /dev/null
> +++ b/meta/recipes-devtools/valgrind/valgrind-3.7.0/valgrind-3.7.0-fix-error-of-reading-debug-info.patch
> @@ -0,0 +1,11 @@
> +--- 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; "
> diff --git a/meta/recipes-devtools/valgrind/valgrind_3.7.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.7.0.bb
> index abda7a6..651ae60 100644
> --- a/meta/recipes-devtools/valgrind/valgrind_3.7.0.bb
> +++ b/meta/recipes-devtools/valgrind/valgrind_3.7.0.bb
> @@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c46082167a314d785d012a244748d803 \
>
>  X11DEPENDS = "virtual/libx11"
>  DEPENDS = "${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
> -PR = "r5"
> +PR = "r6"
>
>  SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
>            file://fix_issue_caused_by_ccache.patch \
> @@ -21,6 +21,9 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
>             file://configure-with-glibc-2.16.patch \
>            "
>
> +SRC_URI_append_powerpc = " file://valgrind-3.7.0-fix-error-of-reading-debug-info.patch"
> +SRC_URI_append_powerpc64 = "file://valgrind-3.7.0-fix-error-of-reading-debug-info.patch"

Is it safe to apply this to everything? I can't image an elf issue
would be powerpc specific.

-M

> +
>  SRC_URI[md5sum] = "a855fda56edf05614f099dca316d1775"
>  SRC_URI[sha256sum] = "5d62c0330f1481fe2c593249192fa68ff454c19c34343978cc9ce91aa324cbf6"
>
> --
> 1.7.9.5
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Saul Wold - Sept. 12, 2012, 4:11 a.m.
On 09/11/2012 09:02 PM, McClintock Matthew-B29882 wrote:
> On Tue, Sep 11, 2012 at 10:44 PM,  <b19537@freescale.com> wrote:
>> From: Zhenhua Luo <b19537@freescale.com>
>>
>>      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>
>> ---
>>   ...ind-3.7.0-fix-error-of-reading-debug-info.patch |   11 +++++++++++
>>   meta/recipes-devtools/valgrind/valgrind_3.7.0.bb   |    5 ++++-
>>   2 files changed, 15 insertions(+), 1 deletion(-)
>>   create mode 100644 meta/recipes-devtools/valgrind/valgrind-3.7.0/valgrind-3.7.0-fix-error-of-reading-debug-info.patch
>>
>> diff --git a/meta/recipes-devtools/valgrind/valgrind-3.7.0/valgrind-3.7.0-fix-error-of-reading-debug-info.patch b/meta/recipes-devtools/valgrind/valgrind-3.7.0/valgrind-3.7.0-fix-error-of-reading-debug-info.patch
>
> Patch needs Upstream-Status:
>
and Signed-off-by:

Thanks
	Sau!

> -M
>
>> new file mode 100644
>> index 0000000..c3ebd67
>> --- /dev/null
>> +++ b/meta/recipes-devtools/valgrind/valgrind-3.7.0/valgrind-3.7.0-fix-error-of-reading-debug-info.patch
>> @@ -0,0 +1,11 @@
>> +--- 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; "
>> diff --git a/meta/recipes-devtools/valgrind/valgrind_3.7.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.7.0.bb
>> index abda7a6..651ae60 100644
>> --- a/meta/recipes-devtools/valgrind/valgrind_3.7.0.bb
>> +++ b/meta/recipes-devtools/valgrind/valgrind_3.7.0.bb
>> @@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c46082167a314d785d012a244748d803 \
>>
>>   X11DEPENDS = "virtual/libx11"
>>   DEPENDS = "${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
>> -PR = "r5"
>> +PR = "r6"
>>
>>   SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
>>             file://fix_issue_caused_by_ccache.patch \
>> @@ -21,6 +21,9 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
>>              file://configure-with-glibc-2.16.patch \
>>             "
>>
>> +SRC_URI_append_powerpc = " file://valgrind-3.7.0-fix-error-of-reading-debug-info.patch"
>> +SRC_URI_append_powerpc64 = "file://valgrind-3.7.0-fix-error-of-reading-debug-info.patch"
>
> Is it safe to apply this to everything? I can't image an elf issue
> would be powerpc specific.
>
> -M
>
>> +
>>   SRC_URI[md5sum] = "a855fda56edf05614f099dca316d1775"
>>   SRC_URI[sha256sum] = "5d62c0330f1481fe2c593249192fa68ff454c19c34343978cc9ce91aa324cbf6"
>>
>> --
>> 1.7.9.5
>>
>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>
Zhenhua Luo - Sept. 12, 2012, 7:50 a.m.
> -----Original Message-----
> From: McClintock Matthew-B29882
> Sent: Wednesday, September 12, 2012 12:03 PM
> 
> >
> > diff --git
> > a/meta/recipes-devtools/valgrind/valgrind-3.7.0/valgrind-3.7.0-fix-err
> > or-of-reading-debug-info.patch
> > b/meta/recipes-devtools/valgrind/valgrind-3.7.0/valgrind-3.7.0-fix-err
> > or-of-reading-debug-info.patch
> 
> Patch needs Upstream-Status:
[Luo Zhenhua-B19537] should the status be Pending if the patch has not been sent to upstream? 

> > +SRC_URI_append_powerpc = " file://valgrind-3.7.0-fix-error-of-reading-
> debug-info.patch"
> > +SRC_URI_append_powerpc64 = "file://valgrind-3.7.0-fix-error-of-
> reading-debug-info.patch"
[Luo Zhenhua-B19537] I think it is better to keep it for PPC before the issue is reported on targets of other arch. 


Best Regards,

Zhenhua
Paul Eggleton - Sept. 13, 2012, 9:52 a.m.
On Wednesday 12 September 2012 07:50:23 Luo Zhenhua-B19537 wrote:
> > -----Original Message-----
> > From: McClintock Matthew-B29882
> > Sent: Wednesday, September 12, 2012 12:03 PM
> > 
> > > diff --git
> > > a/meta/recipes-devtools/valgrind/valgrind-3.7.0/valgrind-3.7.0-fix-err
> > > or-of-reading-debug-info.patch
> > > b/meta/recipes-devtools/valgrind/valgrind-3.7.0/valgrind-3.7.0-fix-err
> > > or-of-reading-debug-info.patch
> > 
> > Patch needs Upstream-Status:
> [Luo Zhenhua-B19537] should the status be Pending if the patch has not been
> sent to upstream?

If the patch is suitable for sending upstream, yes.

Cheers,
Paul

Patch

diff --git a/meta/recipes-devtools/valgrind/valgrind-3.7.0/valgrind-3.7.0-fix-error-of-reading-debug-info.patch b/meta/recipes-devtools/valgrind/valgrind-3.7.0/valgrind-3.7.0-fix-error-of-reading-debug-info.patch
new file mode 100644
index 0000000..c3ebd67
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind-3.7.0/valgrind-3.7.0-fix-error-of-reading-debug-info.patch
@@ -0,0 +1,11 @@ 
+--- 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; "
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.7.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.7.0.bb
index abda7a6..651ae60 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.7.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.7.0.bb
@@ -9,7 +9,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=c46082167a314d785d012a244748d803 \
 
 X11DEPENDS = "virtual/libx11"
 DEPENDS = "${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
-PR = "r5"
+PR = "r6"
 
 SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
 	   file://fix_issue_caused_by_ccache.patch \
@@ -21,6 +21,9 @@  SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
            file://configure-with-glibc-2.16.patch \
           "
 
+SRC_URI_append_powerpc = " file://valgrind-3.7.0-fix-error-of-reading-debug-info.patch"
+SRC_URI_append_powerpc64 = "file://valgrind-3.7.0-fix-error-of-reading-debug-info.patch"
+
 SRC_URI[md5sum] = "a855fda56edf05614f099dca316d1775"
 SRC_URI[sha256sum] = "5d62c0330f1481fe2c593249192fa68ff454c19c34343978cc9ce91aa324cbf6"