This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Does gdb 5.2 support gcc 3.1.1 on Linux/mips?
- From: "H . J . Lu" <hjl at lucon dot org>
- To: binutils at sources dot redhat dot com
- Cc: jakub at redhat dot com
- Date: Mon, 3 Jun 2002 09:29:59 -0700
- Subject: Re: Does gdb 5.2 support gcc 3.1.1 on Linux/mips?
- References: <20020602143627.A10506@lucon.org> <20020603010003.GA16363@branoic.them.org> <20020602194326.A14976@lucon.org> <20020603050101.GA18906@branoic.them.org> <20020602220534.B17122@lucon.org> <20020603050906.GA19164@branoic.them.org> <20020602224240.A17723@lucon.org> <20020602230331.A18107@lucon.org> <20020602231016.A18236@lucon.org> <20020603141808.GA24114@branoic.them.org>
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.