Does gdb 5.2 support gcc 3.1.1 on Linux/mips?
H . J . Lu
hjl@lucon.org
Mon Jun 3 09:30:00 GMT 2002
Ok, it does look like a linker bug. For Linux/mipsel:
# readelf -S ~/tmp/s.o| grep .debug_str
[26] .debug_str MIPS_DWARF 00000000 00103f 000a96 01 MS 0 0 1
# readelf -S ~/tmp/s| grep .debug_str
[30] .debug_str MIPS_DWARF 00000000 002048 000a2a 01 MS 0 0 1
Please note that on Linux/mipsel, the .debug_str section type is
MIPS_DWARF, not like PROGBITS on Linux/x86. Also it is marked "MS".
Somehow, linker failed to handle it and gdb complained:
3733 error ("DW_FORM_strp pointing outside of .debug_str section");
(top-gdb) list
3728 error ("DW_FORM_strp used without .debug_str section");
3729 return NULL;
3730 }
3731 if (str_offset >= dwarf_str_size)
3732 {
3733 error ("DW_FORM_strp pointing outside of .debug_str section");
3734 return NULL;
3735 }
3736 gdb_assert (HOST_CHAR_BIT == 8);
3737 if (dwarf_str_buffer[str_offset] == '\0')
(top-gdb) print str_offset
$9 = 2617
(top-gdb) print dwarf_str_size
$10 = 2602
Jakub, it looks like a SHF_MERGE related bug. Any ideas?
Thanks.
H.J.
More information about the Binutils
mailing list