https://zerobin.net/?0bf6ea80afca0924#PT/yP+KTPOXYx/+IKUC+wwhm/UCF+S2fccpHQB9Cf7Q=


[That "paste" site says that the page expires in 6 days.]

Looking at the dumped data, I see three Elf32_Shdr Sections named ".rodata":

  [18] .rodata           PROGBITS        00093ac0 093ac0 003504 00   A  0   0 32
  [28] .rodata           PROGBITS        000970ac 0970ac 0002b4 01 AMS  0   0  4
  [41] .rodata           PROGBITS        00098a97 098a97 0001a9 01 AMS  0   0  1

while the valgrind code in  coregrind/m_debuginfo/readelf.c
subroutine Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di )
appears to assume that there will be only one such ".rodata":

      if (0 == VG_(strcmp)(name, ".rodata")) {
         if (inrx && !di->rodata_present) {   \\\  only
            di->rodata_present = True;        ///    once?
            di->rodata_svma = svma;
            di->rodata_avma = svma + inrx->bias;
            di->rodata_size = size;
            di->rodata_bias = inrx->bias;
            di->rodata_debug_svma = svma;
            di->rodata_debug_bias = inrx->bias;
                                    /* NB was 'inrw' prior to r11794 */
            TRACE_SYMTAB("acquiring .rodata svma = %#lx .. %#lx\n",
                         di->rodata_svma,
                         di->rodata_svma + di->rodata_size - 1);
            TRACE_SYMTAB("acquiring .rodata avma = %#lx .. %#lx\n",
                         di->rodata_avma,
                         di->rodata_avma + di->rodata_size - 1);
            TRACE_SYMTAB("acquiring .rodata bias = %#lx\n",
                         (UWord)di->rodata_bias);
         } else {
            BAD(".rodata");
         }
      }

It might be possible to confirm this diagnosis by turning on TRACE_SYMTAB
(which is controlled by command-line argument --trace-symtab=yes
and perhaps by --trace-symtab-patt=<patt> ) and looking through
what valgrind reports.

[Of course I also see the many hundreds of Sections ".rodata.<subr_name>"
and ".text.<subr_name>" and ".text.unlikely.<subr_name>" which at first
glance seem to be overkill and/or extravagant waste of space.  There
should be a more-compact way to convey the information.]





------------------------------------------------------------------------------
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