This is the mail archive of the 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: Only call add_dynamic_reloc for a dynamic reloc

This minor cleanup patch to gold only calls add_dynamic_reloc if we are
in fact adding a dynamic reloc.  Previously this was called for any
reloc.  In practice this only made a difference when using
--emit-relocs.  Committed to mainline.


2011-12-16  Ian Lance Taylor  <>

	* output.h (Output_data_reloc_generic::add): Only call
	add_dynamic_reloc if this is a dynamic reloc section.

Index: output.h
RCS file: /cvs/src/src/gold/output.h,v
retrieving revision 1.130
diff -p -u -r1.130 output.h
--- output.h	10 Oct 2011 17:29:52 -0000	1.130
+++ output.h	16 Dec 2011 23:46:18 -0000
@@ -1458,7 +1458,8 @@ class Output_data_reloc_base : public Ou
     this->set_current_data_size(this->relocs_.size() * reloc_size);
-    od->add_dynamic_reloc();
+    if (dynamic)
+      od->add_dynamic_reloc();
     if (reloc.is_relative())
     Sized_relobj<size, big_endian>* relobj = reloc.get_relobj();

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