2015-07-23 Ian Coolidge <icoolidge@google.com>
authorHan Shen <shenhan@google.com>
Thu, 23 Jul 2015 22:52:22 +0000 (15:52 -0700)
committerHan Shen <shenhan@google.com>
Thu, 23 Jul 2015 22:56:33 +0000 (15:56 -0700)
Plumb --pic-veneer option for gold.

gold/ChangeLog:
* arm.cc (Reloc_stub::stub_type_for_reloc): Plumb to stub generation.
* options.h (General_options): Add --pic-veneer option.

gold/ChangeLog
gold/arm.cc
gold/options.h

index 2977734f3ce47227f4049d25a43b8e955d83f232..987a33a993feef85103796f86685dbd71468419f 100644 (file)
@@ -1,3 +1,10 @@
+2015-07-23  Ian Coolidge  <icoolidge@google.com>
+       Plumb --pic-veneer option for gold.
+
+       * arm.cc (Reloc_stub::stub_type_for_reloc): Plumb to stub
+       generation.
+       * options.h (General_options): Add --pic-veneer option.
+
 2015-07-22  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR gold/18663
index 621b28e4c26f18cd37cf31e4a022d2bc8f1366a3..fa9fdb240c4032ef374a1cdf8cd73169355e7716 100644 (file)
@@ -4542,7 +4542,7 @@ Reloc_stub::stub_type_for_reloc(
   // This is a bit ugly but we want to avoid using a templated class for
   // big and little endianities.
   bool may_use_blx;
-  bool should_force_pic_veneer;
+  bool should_force_pic_veneer = parameters->options().pic_veneer();
   bool thumb2;
   bool thumb_only;
   if (parameters->target().is_big_endian())
@@ -4550,7 +4550,7 @@ Reloc_stub::stub_type_for_reloc(
       const Target_arm<true>* big_endian_target =
        Target_arm<true>::default_target();
       may_use_blx = big_endian_target->may_use_v5t_interworking();
-      should_force_pic_veneer = big_endian_target->should_force_pic_veneer();
+      should_force_pic_veneer |= big_endian_target->should_force_pic_veneer();
       thumb2 = big_endian_target->using_thumb2();
       thumb_only = big_endian_target->using_thumb_only();
     }
@@ -4559,7 +4559,8 @@ Reloc_stub::stub_type_for_reloc(
       const Target_arm<false>* little_endian_target =
        Target_arm<false>::default_target();
       may_use_blx = little_endian_target->may_use_v5t_interworking();
-      should_force_pic_veneer = little_endian_target->should_force_pic_veneer();
+      should_force_pic_veneer |=
+        little_endian_target->should_force_pic_veneer();
       thumb2 = little_endian_target->using_thumb2();
       thumb_only = little_endian_target->using_thumb_only();
     }
index f4da1280a6507e9fefbe063ea2c29a2081a13d6e..641efee3a37fddec971eaaf626884ecd70e6050e 100644 (file)
@@ -982,6 +982,10 @@ class General_options
                    N_("Do not create a position independent executable"),
                    false);
 
+  DEFINE_bool(pic_veneer, options::TWO_DASHES, '\0', false,
+             N_("Force PIC sequences for ARM/Thumb interworking veneers"),
+             NULL);
+
   DEFINE_bool(pipeline_knowledge, options::ONE_DASH, '\0', false,
              NULL, N_("(ARM only) Ignore for backward compatibility"));
 
This page took 0.036366 seconds and 4 git commands to generate.