diff options
author | Han Shen <shenhan@google.com> | 2016-02-04 14:18:54 -0800 |
---|---|---|
committer | Han Shen <shenhan@google.com> | 2016-02-05 10:14:21 -0800 |
commit | 546435180dfe950e1c6b8447c695655d4bd8b553 (patch) | |
tree | 346cb76c499ccef863acd2da57f519cf27151455 /binutils-2.25/gold/ChangeLog | |
parent | c327c9c1bcffd231fcaa05f3fd8c047d1fe0afcc (diff) | |
download | toolchain_binutils-546435180dfe950e1c6b8447c695655d4bd8b553.tar.gz toolchain_binutils-546435180dfe950e1c6b8447c695655d4bd8b553.tar.bz2 toolchain_binutils-546435180dfe950e1c6b8447c695655d4bd8b553.zip |
Backport upstream patch to fix linker internal error.
The error happens while linking a huge arm32 binary (for example, a
debuggable chrome browser on arm) - the plt jump offset overflows. This
fixes the problem by introducing another level of indirection.
By default this does not affect anything. However in case of plt jump
offset overflow, instead of triggering an internal error, the linker
generates a proper message and suggests add "--long-plt" to the linker
command.
Tested via linking debug chrome browser for arm32.
Also tested by build.py on android.
The upstream patch -
commit ce3e49806d505721e0875e704de0b6fcba7660ed
Author: Peter Collingbourne <pcc@google.com>
Date: Thu Dec 17 16:50:35 2015 -0800
Implement --long-plt flag (ARM only).
gold/
PR gold/18780
* arm.cc (Target_arm::do_make_data_plt): Choose PLT generator
based
on value of --long-plt flag.
(Output_data_plt_arm_standard::do_get_plt_entry_size): Moved to
Output_data_plt_arm_short.
(Output_data_plt_arm_standard::do_fill_plt_entry): Likewise.
(Output_data_plt_arm_standard::plt_entry): Likewise.
(Output_data_plt_arm_standard::do_fill_first_plt_entry): Fix
variable reference.
(Output_data_plt_arm_short): New class.
(Output_data_plt_arm_short::do_fill_plt_entry): Error out on too
large
PLT offsets instead of asserting.
(Output_data_plt_arm_long): New class.
* options.h (General_options): Define --long-plt flag.
Change-Id: Ia61126a09f2213d1ca5c3635ec9e5b36a63f6cf3
Diffstat (limited to 'binutils-2.25/gold/ChangeLog')
-rw-r--r-- | binutils-2.25/gold/ChangeLog | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/binutils-2.25/gold/ChangeLog b/binutils-2.25/gold/ChangeLog index 2ba3b2b8..aa93c36b 100644 --- a/binutils-2.25/gold/ChangeLog +++ b/binutils-2.25/gold/ChangeLog @@ -1,3 +1,20 @@ +2015-12-17 Peter Collingbourne <pcc@google.com> + + PR gold/18780 + * arm.cc (Target_arm::do_make_data_plt): Choose PLT generator based + on value of --long-plt flag. + (Output_data_plt_arm_standard::do_get_plt_entry_size): Moved to + Output_data_plt_arm_short. + (Output_data_plt_arm_standard::do_fill_plt_entry): Likewise. + (Output_data_plt_arm_standard::plt_entry): Likewise. + (Output_data_plt_arm_standard::do_fill_first_plt_entry): Fix + variable reference. + (Output_data_plt_arm_short): New class. + (Output_data_plt_arm_short::do_fill_plt_entry): Error out on too large + PLT offsets instead of asserting. + (Output_data_plt_arm_long): New class. + * options.h (General_options): Define --long-plt flag. + 2016-01-15 Han Shen <shenhan@google.com> PR gold/19472 - need pc-relative stubs. |