This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: Patch to fix internal linker error
- To: nickc@cygnus.co.uk
- Subject: Re: Patch to fix internal linker error
- From: Ian Lance Taylor <ian@zembu.com>
- Date: 6 Sep 1999 13:17:03 -0400
- CC: binutils@sourceware.cygnus.com
- References: <199909061618.RAA00783@pathia.cygnus.co.uk>
Date: Mon, 6 Sep 1999 17:18:13 +0100
From: Nick Clifton <nickc@cygnus.com>
And if I look at line 110 of the builtin script (pe.sc) I see:
.stab BLOCK(__section_alignment__) (NOLOAD) :
{
[ .stab ]
}
.stabstr BLOCK(__section_alignment__) (NOLOAD) :
{
[ .stabstr ]
}
} <===line 110
This is the end of the script, so it's the line number you would see
for any error which occurs after the script is parsed.
So I reasoned that accepting BLOCK as an ALIGN_K operation would be a
reasonable fix.
If you look in ldgram.y, though, you'll see that BLOCK in an
expression in a linker script is translated into ALIGN_K. So that
doesn't explain how BLOCK would up in a node_code field.
In fact, unless somebody can argue otherwise, I think that however
BLOCK got in there, it's a bug. The question is whether it is a
straightforward bug or whether it is some sort of memory corruption.
The switch statement should not be changed, because that would be
covering up the bug by treating the symptoms rather than fixing the
actual bug itself.
Ian