From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Blandy To: Kevin Buettner Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] symtab.c: Search section table when fixing up a symbol's section Date: Mon, 17 May 2004 21:01:00 -0000 Message-id: References: <20040517120219.5fad9bc0@saguaro> X-SW-Source: 2004-05/msg00511.html Kevin Buettner 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.