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 obvious] Fix internal error with --output-symbol-counts


The --output-symbol-counts option in gold can trigger an internal
error when a global symbol from a shared object does not appear in the
dynamic symbol table. I'm applying this trivial patch to fix the
problem.

Tested on x86_64.

-cary


2012-06-04  Cary Coutant  <ccoutant@google.com>

	* dynobj.cc (Sized_dynobj::do_get_global_symbol_counts): Call
	has_dynsym_index.


Index: dynobj.cc
===================================================================
RCS file: /cvs/src/src/gold/dynobj.cc,v
retrieving revision 1.63
diff -u -p -r1.63 dynobj.cc
--- dynobj.cc	2 Jul 2011 05:29:59 -0000	1.63
+++ dynobj.cc	4 Jun 2012 19:54:33 -0000
@@ -823,7 +823,7 @@ Sized_dynobj<size, big_endian>::do_get_g
 	&& (*p)->source() == Symbol::FROM_OBJECT
 	&& (*p)->object() == this
 	&& (*p)->is_defined()
-	&& (*p)->dynsym_index() != -1U)
+	&& (*p)->has_dynsym_index())
       ++count;
   *used = count;
 }


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