This is the mail archive of the binutils-cvs@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]

[binutils-gdb] [GOLD, PowerPC] Add --no-stub-group-multi


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ab502e635e78a6c6c9c8abf3072bfeedaca9c26f

commit ab502e635e78a6c6c9c8abf3072bfeedaca9c26f
Author: Alan Modra <amodra@gmail.com>
Date:   Tue Sep 19 11:45:51 2017 +0930

    [GOLD, PowerPC] Add --no-stub-group-multi
    
    The trouble with stubs per output section is that ppc32 uses a plt
    stub as the address of a global function.  This needs to be unique,
    otherwise we'll get multiple addresses for a function.
    
    Obviously this is only a partial solution, since ppc32 will get
    multiple stubs when code is larger than 33M.  A proper fix will
    involve selecting a unique stub to use for non-branch relocs.
    
    	* options.h (stub-group-multi): Default to true.  Add
    	--no-stub-group-multi.

Diff:
---
 gold/ChangeLog | 5 +++++
 gold/options.h | 5 +++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/gold/ChangeLog b/gold/ChangeLog
index 2343215..867cbef 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,8 @@
+2017-09-19  Alan Modra  <amodra@gmail.com>
+
+	* options.h (stub-group-multi): Default to true.  Add
+	--no-stub-group-multi.
+
 2017-08-30  Alan Modra  <amodra@gmail.com>
 
 	* powerpc.cc (Target_powerpc::Relocate::relocate): Nop addis on
diff --git a/gold/options.h b/gold/options.h
index 6d10b41..93f81b2 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -1235,9 +1235,10 @@ class General_options
 		"stubs are always after the group. 1 means use default size"),
 	     N_("SIZE"));
 
-  DEFINE_bool(stub_group_multi, options::TWO_DASHES, '\0', false,
+  DEFINE_bool(stub_group_multi, options::TWO_DASHES, '\0', true,
 	      N_("(PowerPC only) Allow a group of stubs to serve multiple "
-		 "output sections"), NULL);
+		 "output sections"),
+	      N_("(PowerPC only) Each output section has its own stubs"));
 
   DEFINE_uint(split_stack_adjust_size, options::TWO_DASHES, '\0', 0x4000,
 	      N_("Stack size when -fsplit-stack function calls non-split"),


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