diff options
author | Han Shen <shenhan@google.com> | 2016-01-14 14:26:29 -0800 |
---|---|---|
committer | Han Shen <shenhan@google.com> | 2016-01-14 17:09:13 -0800 |
commit | 6579e31a8757a1df50ca408dd1b3cd3fe59bb4b6 (patch) | |
tree | 3747b2de9900c9278020f903fceaecc1186e5d55 /binutils-2.25/gold/options.h | |
parent | a95c2e5c5e5338f535c730b2333e797adf2872c0 (diff) | |
download | toolchain_binutils-6579e31a8757a1df50ca408dd1b3cd3fe59bb4b6.tar.gz toolchain_binutils-6579e31a8757a1df50ca408dd1b3cd3fe59bb4b6.tar.bz2 toolchain_binutils-6579e31a8757a1df50ca408dd1b3cd3fe59bb4b6.zip |
Backport trunk patch for not applying dynamic relocs.
Note, there is a small change from the origin patch - while in the
upstream patch, the option --no-apply-dynamic is default off, it is on
by default in this CL.
This should not bring any changes to android or chromeos, because the
relocation value this CL changes is not used by chromeos, and is not
used by android either (after the fix in bionic months ago).
The backported patch is -
commit 0eccf19f96d6218dd7c2f8d13f0546c2b942cc08
Author: Cary Coutant <ccoutant@gmail.com>
Date: Thu Nov 5 12:24:14 2015 -0800
Add aarch64-specific --no-apply-dynamic-relocs option.
With --no-apply-dynamic-relocs on aarch64 targets, gold will not
apply
link-time values for absolute relocations that become dynamic
relocations.
This provides a workaround for broken Android dynamic linkers that
use
the link-time value as an extra addend to the relocation.
gold/
PR gold/19163
* aarch64.cc (Target_aarch64::Relocate::relocate): Don't apply
certain relocations if --no-apply-dynamic-relocs is set.
* options.h (--apply-dynamic-relocs): New aarch64-specific
option.
Tested - build whole toolchain and built android N9 image.
Change-Id: Ida524bbee2a83574cd9e78ffdad9270787327c78
Diffstat (limited to 'binutils-2.25/gold/options.h')
-rw-r--r-- | binutils-2.25/gold/options.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/binutils-2.25/gold/options.h b/binutils-2.25/gold/options.h index 6502e1fc..db5254b8 100644 --- a/binutils-2.25/gold/options.h +++ b/binutils-2.25/gold/options.h @@ -644,6 +644,13 @@ class General_options N_("Allow unresolved references in shared libraries"), N_("Do not allow unresolved references in shared libraries")); + // Note: this is cherry-picked from upstream patch 0eccf19f9. But the default + // value is changed from "true" to "false". + DEFINE_bool(apply_dynamic_relocs, options::TWO_DASHES, '\0', false, + N_("Apply link-time values for dynamic relocations (default)"), + N_("(aarch64 only) Do not apply link-time values " + "for dynamic relocations")); + DEFINE_bool(as_needed, options::TWO_DASHES, '\0', false, N_("Only set DT_NEEDED for shared libraries if used"), N_("Always DT_NEEDED for shared libraries")); |