This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Simple bug fix in gold linker.
- From: Sriraman Tallam <tmsriram at google dot com>
- To: binutils <binutils at sourceware dot org>, Easwaran Raman <eraman at google dot com>, Ian Lance Taylor <iant at google dot com>
- Date: Fri, 25 May 2012 14:42:56 -0700
- Subject: 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.