PATCH: Fix alpha assembler crash
H. J. Lu
hjl@lucon.org
Mon Nov 24 22:25:00 GMT 2003
On Mon, Nov 24, 2003 at 12:52:55AM +0100, Jakub Bogusz wrote:
> Hello,
>
> I noticed that as from binutils 2.14.90.0.7 segfaults on alpha-linux on
> some wrongly generated file. It appeared that file had two '.end' for
> one function; but SEGV occurs in even simpler case, where '.end' is not
> preceded with '.ent' - just after error message:
>
> $ ~/gdb --args rpm/BUILD/binutils-2.14.90.0.7/gas/.libs/as-new as-test.S
> [...]
This patch fixes the assembler crash.
H.J.
----
2003-11-24 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-alpha.c (s_alpha_end): Don't crash if there is no
matching .ent.
--- gas/config/tc-alpha.c.ent 2003-11-24 11:56:53.000000000 -0800
+++ gas/config/tc-alpha.c 2003-11-24 14:20:45.000000000 -0800
@@ -4494,7 +4494,7 @@ s_alpha_end (dummy)
as_warn (_(".end directive names different symbol than .ent"));
/* Create an expression to calculate the size of the function. */
- if (sym)
+ if (sym && cur_frame_data)
{
OBJ_SYMFIELD_TYPE *obj = symbol_get_obj (sym);
expressionS *exp = xmalloc (sizeof (expressionS));
More information about the Binutils
mailing list