bogus test case expectations
H.J. Lu
hjl.tools@gmail.com
Tue Jul 21 17:50:00 GMT 2009
On Tue, Jul 21, 2009 at 8:39 AM, Jan Beulich<JBeulich@novell.com> wrote:
>>>> "H.J. Lu" <hjl.tools@gmail.com> 21.07.09 17:33 >>>
>>On Tue, Jul 21, 2009 at 8:18 AM, Jan Beulich<JBeulich@novell.com> wrote:
>>>>>> "H.J. Lu" <hjl.tools@gmail.com> 21.07.09 16:38 >>>
>>>>On Tue, Jul 21, 2009 at 4:51 AM, Jan Beulich<JBeulich@novell.com> wrote:
>>>>> Finally I found time to debug why, after initially working with the
>>>>> snapshot_symbol() change I had done in late 2005, some local changes I
>>>>> had on top of this stopped working in newer binutils releases. I was about
>>>>> to propose below change (with the rationale that the comment "Never
>>>>> change a defined symbol.", while correct, didn't match the code, as the
>>>>> check was done against the perhaps already updated symbol, not the
>>>>> one that got passed in). This, however, causes one of the four ia64 test
>>>>> cases added together with that change to fail.
>>>>
>>>>I have no objections to update comments.
>>>
>>> My goal is to make the code do what the comment says (which is what I'd
>>> also expect the code to do), not adjust the comment. But perhaps I mis-
>>> understand the intentions you had when making the change? If so, you'd
>>> be asked to provide a comment explaining those intentions...
>>>
>>
>>My change was to fix
>>
>>http://www.sourceware.org/bugzilla/show_bug.cgi?id=2117
>>
>>ltoff22x-2.[sd] is one testcase for PR 2117. As long as those
>>testcases pass without modifications, I have no problems.
>
> Again, I understand all that. What I don't understand is why the code change
> you did doesn't match the description associated with it. Instead of me
> repeating the issue I'm having with it, could you please re-read the initial
> part of my mail (still visible above)?
>
> Thanks, Jan
>
The code looks like
int
snapshot_symbol (symbolS **symbolPP, valueT *valueP, segT *segP, fragS **fragPP)
{
symbolS *symbolP = *symbolPP;
...
/* Resolve symbolP. */
/* Never change a defined symbol. */
if (symbolP->bsym->section == undefined_section
|| symbolP->bsym->section == expr_section)
*symbolPP = symbolP;
We don't change *symbolPP to its resolved value if it is defined.
--
H.J.
More information about the Binutils
mailing list