This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Crash on unrepresentable reloc


This causes the ia64 assembler to crash:

1: .word 1b

tc_gen_reloc is supposed to return NULL on unrepresentable relocs.
Checked in as obvious.

Andreas.

2007-08-14  Andreas Schwab  <schwab@suse.de>

	* config/tc-ia64.c (tc_gen_reloc): Return NULL if relocation is
	unrepresentable.

--- gas/config/tc-ia64.c.~1.192.~	2007-07-04 11:53:28.000000000 +0200
+++ gas/config/tc-ia64.c	2007-08-14 12:32:16.000000000 +0200
@@ -11678,6 +11678,8 @@ tc_gen_reloc (sec, fixp)
       as_bad_where (fixp->fx_file, fixp->fx_line,
 		    "Cannot represent %s relocation in object file",
 		    bfd_get_reloc_code_name (fixp->fx_r_type));
+      free (reloc);
+      return NULL;
     }
   return reloc;
 }

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]