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
3 files changed