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]

Simple bug fix in gold linker.


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.


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