Simple bug fix in gold linker.

Sriraman Tallam tmsriram@google.com
Fri May 25 21:43:00 GMT 2012


Hi,

   Patch ok? This was causing an uninitialized variable error while building.

	* symtab.cc (Symbol_table::add_undefined_symbol_from_command_line):
	Initialize oldsym to prevent uninitialized variable errors.

  Index: symtab.cc
===================================================================
RCS file: /cvs/src/src/gold/symtab.cc,v
retrieving revision 1.165
diff -u -u -p -r1.165 symtab.cc
--- symtab.cc	22 May 2012 23:50:52 -0000	1.165
+++ symtab.cc	25 May 2012 21:40:38 -0000
@@ -2345,7 +2345,7 @@ Symbol_table::add_undefined_symbol_from_
   const char* version = NULL;

   Sized_symbol<size>* sym;
-  Sized_symbol<size>* oldsym;
+  Sized_symbol<size>* oldsym = NULL;
   bool resolve_oldsym;
   if (parameters->target().is_big_endian())
     {


Thanks,
-Sri.



More information about the Binutils mailing list