https://bugs.kde.org/show_bug.cgi?id=397357

            Bug ID: 397357
           Summary: symbols not loaded with binutils-2.31.1 unless
                    -fuse-ld=gold specified to gcc/g++
           Product: valgrind
           Version: 3.13.0
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: jsew...@acm.org
          Reporter: starlight.201...@binnacle.cx
  Target Milestone: ---

Unusual setup here, running ancient distro and kernel but with recent/current
tools built from source.

Compiled and installed binutils-2.31.1 a week ago and just noticed that
valgrind no longer reads .debug_info from 64-bit ELF binaries unless gcc/g++ is
invoked with -fuse-ld=gold to select linking with gold linker.

Was at valgrind 3.10.0, immediately built and installed 3.13.0 which made no
difference.  Problem appears independent of GCC version, tried 4.9.4 and 8.2,
both C and C++.

Invoking valgrind with --trace-symtab=yes -v shows symbols from prior binutils
generated libraries loading but for the target, loading fails with

{{{
------ Examining the program headers ------
PT_LOAD[2]: p_vaddr 0x400000 (prev 0x0)
PT_LOAD[2]:   p_offset 0, p_filesz 7240, perms r--
--26491-- ELF section outside all mapped regions
------ ELF reading failed ------
------ name = xxxx
------ end ELF OBJECT -------------------------------------------------------
}}}

instead of progressing to PT_LOAD[3] and then

{{{
------ Examining the section headers ------
------ Finding image addresses for debug-info sections ------
------ The contents of .debug_ranges ------
------ The contents of .debug_abbrev ------
------ Parsing .debug_info section ------
------ .debug_info reading was successful ------
------ Canonicalising the acquired info ------
------ Notifying m_redir ------
------ name = xxxx
------ end ELF OBJECT -------------------------------------------------------
}}}

Appears the sort of issue worth fixing; or if too difficult, recognize and
recommend users link with gold.

Suggest valgrind complain when ELF reading fails.  Without --trace-symtab=yes
no indication is present.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to