This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] symtab.c: Search section table when fixing up a symbol's section
- From: Jim Blandy <jimb at redhat dot com>
- To: Kevin Buettner <kevinb at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: 17 May 2004 15:57:20 -0500
- Subject: Re: [RFA] symtab.c: Search section table when fixing up a symbol's section
- References: <20040517120219.5fad9bc0@saguaro>
Kevin Buettner <kevinb@redhat.com> writes:
> The patch below fixes all scope.exp failures for the frv-uclinux target.
>
> I believe that fixup_section() was broken for many other targets too,
> but innocuously so, since most targets relocate all sections (for a
> particular objfile) by a single constant. Thus, for those targets, it
> doesn't matter that fixup_section() incorrectly computes (or fails to
> compute) a symbol's section index. OTOH, the frv-uclinux target
> requires that the section index be accurately computed since read-only
> and read/write sections are relocated by different amounts. Other
> targets with this property (such as AIX) avoid the problem by making
> sure that the section value is set correctly by the symbol reader itself.
>
> Other details are included in a comment in the patch itself. (See
> below.)
>
> Thanks to Jim Blandy for suggesting the section table search. My
> first attempt at fixing this problem used a much less efficient
> search of the minimal symbols.
>
> Okay to commit?
Oh, endaddr *is* inclusive. Well done.
I'm going to leave this for others' comments for a few days, but other
than that, it looks good to me.