[gold][aarch64]Patch for Relaxation

Hán Shěn (沈涵) shenhan@google.com
Wed Sep 24 22:50:00 GMT 2014


Hi,

Here we have the patch for gold aarch64 backend to support relaxation.

In short relaxation is the linker's generation of stubs that fixes the
out-of-range jumps/branches in the original object file.

With this implementation, we are able to link a 456MB aarch64 application
(correctness of the result file, though, hasn't been verified.)

Tested:
1) Build natively on x86_64 and aarch64 machines.
2) Pass unit tests regarding relaxation.

gold/ChangeLog:
2014-09-22  Han Shen  <shenhan@google.com>
   Jing Yu   <jingyu@google.com>

* aarch64-reloc.def: Change format.
* aarch64.cc (class Reloc_stub): New class.
(class Stub_table): New class.
(class AArch64_relobj): New class.
(class AArch64_input_section): New class.
(class AArch64_output_section): New class.
(Target_aarch64::new_stub_table): New method.
(Target_aarch64::new_aarch64_input_section): New method.
(Target_aarch64::find_aarch64_input_section): New method.
(Target_aarch64::scan_section_for_stubs): New method.
(Target_aarch64::scan_reloc_section_for_stubs): New method.
(Target_aarch64::relocate_stub): New method.
(Target_aarch64::current_target): New method.
(Target_aarch64::do_make_elf_object): New method.
(Target_aarch64::do_may_relax): New method.
(Target_aarch64::do_relax): New method.
(Target_aarch64::group_sections): New method.
(Target_aarch64::scan_reloc_for_stub): New method.
(Target_aarch64::do_make_output_section): New method.
(Target_aarch64::stub_tables_): New data member.
(Target_aarch64::aarch64_input_section_map_): New data member.
(AArch64_relocate_functions::maybe_apply_stub): New method.

-- 
Han Shen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: relaxation.patch
Type: text/x-patch
Size: 99540 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20140924/d1694e94/attachment.bin>


More information about the Binutils mailing list