This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] MIPS_TEXT symbols should be associated to .text section?
- From: Thiemo Seufer <ica2_ts at csv dot ica dot uni-stuttgart dot de>
- To: Joel Brobecker <brobecker at gnat dot com>
- Cc: binutils at sources dot redhat dot com, gdb-patches at sources dot redhat dot com
- Date: Fri, 30 Jul 2004 00:19:04 +0200
- Subject: Re: [RFA] MIPS_TEXT symbols should be associated to .text section?
- References: <20040721204604.GN1278@gnat.com> <20040729220156.GK1167@gnat.com>
Joel Brobecker wrote:
> Hello BFD maintainers,
>
> Ping? This patch is only 8 days old, and I wouldn't send a reminder
> just a week after sending it, but GDB is completely broken without
> this patch (ie "break main; run" doesn't work)... Would somebody mind
> having a look at it and tell me if it is good or not?
[snip]
> > @@ -4192,6 +4192,20 @@ _bfd_mips_elf_symbol_processing (bfd *ab
> > asym->section = bfd_und_section_ptr;
> > break;
> >
> > + case SHN_MIPS_TEXT:
> > + {
> > + asection *section = bfd_get_section_by_name (abfd, ".text");
> > + if (section != NULL)
> > + {
> > + asym->section = section;
> > + /* MIPS_TEXT is a bit special, the address is not an offset
> > + to the base of the .text section. So substract the section
> > + base address to make it an offset. */
> > + asym->value -= section->vma;
> > + }
> > + break;
> > + }
> > +
> > #if 0 /* for SGI_COMPAT */
> > case SHN_MIPS_TEXT:
> > asym->section = mips_elf_text_section_ptr;
The last three lines in this patch suggest AFAICS to use
mips_elf_text_section_ptr instead of bfd_get_section_by_name,
and to make the test conditional on SGI_COMPAT. The SHN_MIPS_DATA
below should probably get handled similiarily.
Thiemo