public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* gold patch committed: Only call add_dynamic_reloc for a dynamic reloc
@ 2011-12-16 23:48 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2011-12-16 23:48 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 407 bytes --]

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.

Ian


2011-12-16  Ian Lance Taylor  <iant@google.com>

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



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 655 bytes --]

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->relocs_.push_back(reloc);
     this->set_current_data_size(this->relocs_.size() * reloc_size);
-    od->add_dynamic_reloc();
+    if (dynamic)
+      od->add_dynamic_reloc();
     if (reloc.is_relative())
       this->bump_relative_reloc_count();
     Sized_relobj<size, big_endian>* relobj = reloc.get_relobj();

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-12-16 23:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-16 23:48 gold patch committed: Only call add_dynamic_reloc for a dynamic reloc Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).