2018-02-11 22:17 GMT+01:00 Paul Floyd <pjfl...@wanadoo.fr>:
>
>
>> On 11 Feb 2018, at 21:36, John Reiser <jrei...@bitwagon.com> wrote:
>>
>>> --18142-- WARNING: Serious error when reading debug info
>>> --18142-- When reading debug info from 
>>> /export/home/paulf/tools/gcc/lib/libstdc++.so.6.0.25:
>>> --18142-- Can't make sense of .rodata section mapping
>>> (GCC SVN head, Solaris 11.3, Valgrind git head).
>>
>> What does
>>    readelf --headers .../libstdc++.so.6.0.25
>> say about the ElfXX_Shdrs and ElfXX_Phdrs,
>> and the mapping of the Shdrs into the Phdrs?


I don't have libstdc++.so.6.0.25.
I have stock libstdc++.so.6.0.21 which is installed with Solaris 11.3
SRU 28 (currently the latest).

readelf --headers /usr/lib/64/libstdc++.so.6.0.21 returns:

ELF Header:
  Magic:   7f 45 4c 46 02 01 01 06 01 00 00 00 00 00 00 00
  Class:                             ELF64
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - Solaris
  ABI Version:                       1
  Type:                              DYN (Shared object file)
  Machine:                           Advanced Micro Devices X86-64
  Version:                           0x1
  Entry point address:               0x0
  Start of program headers:          64 (bytes into file)
  Start of section headers:          11713976 (bytes into file)
  Flags:                             0x0
  Size of this header:               64 (bytes)
  Size of program headers:           56 (bytes)
  Number of program headers:         5
  Size of section headers:           64 (bytes)
  Number of section headers:         2148
  Section header string table index: 2146

Section Headers:
  [Nr] Name              Type             Address           Offset
       Size              EntSize          Flags  Link  Info  Align
  [ 0]                   NULL             0000000000000000  00000000
       0000000000000000  0000000000000000           0     0     0
  [ 1] .dynamic          DYNAMIC          0000000000000158  00000158
       0000000000000370  0000000000000010   A       8     0     8
  [ 2] .eh_frame_hdr     X86_64_UNWIND    00000000000004c8  000004c8
       0000000000007f44  0000000000000000   A       0     0     8
  [ 3] .eh_frame         X86_64_UNWIND    0000000000008410  00008410
       0000000000023b5c  0000000000000000   A       0     0     8
  [ 4] .SUNW_syminfo     VERDEF           000000000002bf70  0002bf70
       000000000000541c  0000000000000004  AI       7     1     8
  [ 5] .hash             HASH             0000000000031390  00031390
       000000000000a838  0000000000000004   A       7     0     8
  [ 6] .SUNW_ldynsym     LOOS+ffffff3     000000000003bbc8  0003bbc8
       0000000000005868  0000000000000018   A       8   943     8
  [ 7] .dynsym           DYNSYM           0000000000041430  00041430
       000000000001f8a8  0000000000000018   A       8     2     8
  [ 8] .dynstr           STRTAB           0000000000060cd8  00060cd8
       000000000004b69a  0000000000000000  AS       0     0     1
  [ 9] .SUNW_version     VERNEED          00000000000ac378  000ac378
       0000000000000100  0000000000000001   A       8     4     8
  [10] .SUNW_version     VERDEF           00000000000ac478  000ac478
       00000000000004c4  0000000000000001   A       8    35     8
  [11] .SUNW_versym      VERSYM           00000000000ac940  000ac940
       0000000000002a0e  0000000000000002   A       7     0     8
  [12] .SUNW_dynsymsort  LOOS+ffffff1     00000000000af350  000af350
       0000000000005ddc  0000000000000004   A       6     0     8
  [13] .SUNW_dyntlssort  LOOS+ffffff2     00000000000b5130  000b5130
       0000000000000008  0000000000000004   A       6     0     8
  [14] .SUNW_reloc       RELA             00000000000b5138  000b5138
       0000000000017160  0000000000000018   A       7     0     8
  [15] .rela.plt         RELA             00000000000cc298  000cc298
       0000000000004c98  0000000000000018  AI       7   1916     8
  [16] .gcc_except_table PROGBITS         00000000000d0f30  000d0f30
       0000000000007232  0000000000000000   A       0     0     4
  [17] .rodata.str1.1    PROGBITS         00000000000d8162  000d8162
       0000000000000ce2  0000000000000001 AMS       0     0     1
  [18] .rodata._ZTSSt10l PROGBITS         00000000000d8e48  000d8e48
       000000000000000f  0000000000000000   A       0     0     8
  [19] .rodata._ZTSSt14e PROGBITS         00000000000d8e60  000d8e60
       0000000000000013  0000000000000000   A       0     0     16
[...and much more .rodata_* sections, up to...]
  [2147] .SUNW_signature   GNU_HASH         0000000000000000  00b2bc1e
       0000000000000198  0000000000000000   E       0     0     1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings), l (large)
  I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)

Program Headers:
  Type           Offset             VirtAddr           PhysAddr
                 FileSiz            MemSiz              Flags  Align
  LOAD           0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x00000000001a6f65 0x00000000001a6f65  R E    100000
  LOAD           0x00000000001a7000 0x00000000002a7000 0x0000000000000000
                 0x000000000000bd78 0x000000000000f850  RW     100000
  DYNAMIC        0x0000000000000158 0x0000000000000158 0x0000000000000000
                 0x0000000000000370 0x0000000000000000  RW     0
  TLS            0x00000000001b2d78 0x00000000002b2d78 0x0000000000000000
                 0x0000000000000000 0x0000000000000020  RW     8
  LOOS+464e550   0x00000000000004c8 0x00000000000004c8 0x0000000000000000
                 0x0000000000007c14 0x0000000000007c14  R      8

 Section to Segment mapping:
  Segment Sections...
   00     .dynamic .eh_frame_hdr .eh_frame .SUNW_syminfo .hash
.SUNW_ldynsym .dynsym .dynstr .SUNW_version .SUNW_version .SUNW_versym
.SUNW_dynsymsort .SUNW_dyntlssort .SUNW_reloc .rela.plt
.gcc_except_table .rodata.str1.1 .rodata._ZTSSt10lock_error
.rodata._ZTSSt14error_category
.rodata._ZTSNSt12_GLOBAL__N_122generic_error_categoryE
.rodata._ZTSNSt12_GLOBAL__N_121system_error_categoryE
.rodata._ZNSt6chrono12system_clock12is_monotonicE
.rodata._ZTSNSt13__future_base11_State_baseE
.rodata._ZTSNSt13__future_base19_Async_state_commonE
.rodata._ZNSt6chrono12system_clock9is_steadyE
.rodata._ZTSN10__cxxabiv117__array_type_infoE ... [much more entries]
   01     .got .fini_array .init_array .data .jcr .tm_clone_table
.data._ZL16__gthread_active
.data.rel.ro._ZTINSt12_GLOBAL__N_122generic_error_categoryE
.data.rel.ro._ZTINSt12_
GLOBAL__N_121system_error_categoryE
.data.rel.ro._ZTVNSt12_GLOBAL__N_122generic_error_categoryE
.data.rel.ro._ZTVNSt12_GLOBAL__N_121system_error_categoryE
.data._ZZL18__gthread_
active_pvE22__gthread_active_mutex
.data._ZZN12_GLOBAL__N_116get_atomic_mutexEvE12atomic_mutex
.data.rel._ZN10__cxxabiv119__terminate_handlerE
.data.rel._ZN10__cxxabiv120__unexp
ected_handlerE .data.rel.ro.local
.data.rel.ro._ZNSt6locale17_S_twinned_facetsE
.data.rel.ro._ZNSt6locale5_Impl19_S_facet_categoriesE
.data.rel.ro._ZNSt6locale5_Impl14_S_id_mess
agesE .data.rel.ro._ZNSt6locale5_Impl14_S_id_monetaryE
.data.rel.ro._ZNSt6locale5_Impl10_S_id_timeE
.data.rel.ro._ZNSt6locale5_Impl13_S_id_collateE
.data.rel.ro._ZNSt6locale5_Im
pl13_S_id_numericE .data.rel.ro._ZNSt6locale5_Impl11_S_id_ctypeE
.data.rel.local._ZNSt10__num_base12_S_atoms_outE
.data.rel.local._ZNSt10__num_base11_S_atoms_inE .data.rel.local
._ZNSt10money_base8_S_atomsE
.data.rel.local._ZNSt17__timepunct_cacheIwE12_S_timezonesE
.data.rel.local._ZNSt17__timepunct_cacheIcE12_S_timezonesE
.data.rel.ro.local._ZNSt6local
e13_S_categoriesE .data.rel.ro.local._ZN9__gnu_cxxL14category_namesE
.data.rel.ro.local._ZZNK11__gnu_debug16_Error_formatter10_Parameter14_M_print_fieldEPKS0_PKcE13__state_names
 
.data.rel.ro.local._ZZNK11__gnu_debug16_Error_formatter10_Parameter14_M_print_fieldEPKS0_PKcE17__constness_names
.data.rel.local._ZN11__gnu_debug17_S_debug_messagesE .data.rel.
local._ZZN12_GLOBAL__N_126__future_category_instanceEvE5__fec ....
[much more entries]
   02
   03     .tbss._ZZN12_GLOBAL__N_110get_globalEvE6global
.tbss._ZSt11__once_call .tbss._ZSt15__once_callable
   04


Valgrind version valgrind-3.14.0.GIT-5a705cfa90-20180118 on Solaris
11.3 x86 has no problem reading debug info from this libstdc++.so.

There is also native Solaris utility called "elfdump".
You can invoke 'elfdump -p -c -s' on libstdc++.so.6.0.21 and
libstdc++.so.6.0.25 and compare for significant differences.

I.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to