]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[GOLD, PowerPC] Add --no-stub-group-multi
authorAlan Modra <amodra@gmail.com>
Tue, 19 Sep 2017 02:15:51 +0000 (11:45 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 19 Sep 2017 05:11:14 +0000 (14:41 +0930)
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.

(cherry picked from commit ab502e635e78a6c6c9c8abf3072bfeedaca9c26f)

gold/ChangeLog
gold/options.h

index cee2289a23492c15272be30fe80adbdfdc73e685..6071f8977a88c640b3e9c474b3cfa705a20f9e72 100644 (file)
@@ -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-09-15  Nick Clifton  <nickc@redhat.com>
 
        2.29.1 Release
index c7c032bbd7708456cd2c70b91da0528f8ad12c9b..576b2a3c536ea17d7594d1253cfd07bb01b1cd99 100644 (file)
@@ -1234,9 +1234,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"),