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]

gold patch committed: Zero version info in dynobj symbol reader


I committed this patch to gold to zero out the version information in
Sized_dynobj::do_read_symbols.  Otherwise the version information was
left as garbage if the dynamic object had no symbols.

Ian


2009-12-09  Ian Lance Taylor  <iant@google.com>

	* dynobj.cc (Sized_dynobj::do_read_symbols): Clear version
	information fields.


Index: dynobj.cc
===================================================================
RCS file: /cvs/src/src/gold/dynobj.cc,v
retrieving revision 1.47
diff -p -u -r1.47 dynobj.cc
--- dynobj.cc	16 Oct 2009 19:11:32 -0000	1.47
+++ dynobj.cc	10 Dec 2009 01:08:02 -0000
@@ -323,6 +323,14 @@ Sized_dynobj<size, big_endian>::do_read_
   sd->external_symbols_offset = 0;
   sd->symbol_names = NULL;
   sd->symbol_names_size = 0;
+  sd->versym = NULL;
+  sd->versym_size = 0;
+  sd->verdef = NULL;
+  sd->verdef_size = 0;
+  sd->verdef_info = 0;
+  sd->verneed = NULL;
+  sd->verneed_size = 0;
+  sd->verneed_info = 0;
 
   if (this->dynsym_shndx_ != -1U)
     {

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