summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/gold/arm.cc
diff options
context:
space:
mode:
authorLee Campbell <leecam@google.com>2015-11-05 15:20:34 -0800
committerLee Campbell <leecam@google.com>2015-11-05 23:26:04 +0000
commit932d71b859239e834651fdee549dc661cda82fe8 (patch)
tree711446a56db46fbf9edc7558727e5d96192df75b /binutils-2.25/gold/arm.cc
parent0a79d97a250d24bd88a53f8c68b0185f42a1be6a (diff)
downloadtoolchain_binutils-932d71b859239e834651fdee549dc661cda82fe8.tar.gz
toolchain_binutils-932d71b859239e834651fdee549dc661cda82fe8.tar.bz2
toolchain_binutils-932d71b859239e834651fdee549dc661cda82fe8.zip
Plumb --pic-veneer option for gold.
Cherry-pick of upstream commit cdb061674c044636465e52a8c989b9011f2ec8ac gold/ChangeLog: * arm.cc (Reloc_stub::stub_type_for_reloc): Plumb to stub generation. * options.h (General_options): Add --pic-veneer option. BUG: 25512672
Diffstat (limited to 'binutils-2.25/gold/arm.cc')
-rw-r--r--binutils-2.25/gold/arm.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/binutils-2.25/gold/arm.cc b/binutils-2.25/gold/arm.cc
index 299290b3..2d10357a 100644
--- a/binutils-2.25/gold/arm.cc
+++ b/binutils-2.25/gold/arm.cc
@@ -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();
}