forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -644,6 +644,11 @@ class General_options
|
||||
N_("Allow unresolved references in shared libraries"),
|
||||
N_("Do not allow unresolved references in shared libraries"));
|
||||
|
||||
DEFINE_bool(apply_dynamic_relocs, options::TWO_DASHES, '\0', true,
|
||||
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"));
|
||||
|
||||
Reference in New Issue
Block a user