This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gold][aarch64]Patch for Relaxation


Hi Doug, thanks. Done.

-Han

On Tue, Sep 30, 2014 at 1:26 PM, Doug Kwan (éæå) <dougkwan@google.com> wrote:
> [resending message in plain text mode]
>
> We don't have merged EXIDX sections on aarch64.  You may simplify this
> to an assert instead of return null, i.e.
>
> gold_assert(!this->is_output_section_offset_invalid(shndx) ||
>                     os->find_relaxed_input_section(this, shndx) != NULL);
>
> +  // If this requires special offset handling, check to see if it is
> +  // a relaxed section.  If this is not, then it is a merged section that
> +  // we cannot handle.
> +  if (this->is_output_section_offset_invalid(shndx))
> +    {
> +      const Output_relaxed_input_section* poris =
> +         os->find_relaxed_input_section(this, shndx);
> +      if (poris == NULL)
> +       return false;
> +    }
> +
>
> Otherwise LGTM.
>
> On Wed, Sep 24, 2014 at 3:50 PM, HÃn ShÄn (ææ) <shenhan@google.com> wrote:
>> 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



-- 
Han Shen |  Software Engineer |  shenhan@google.com |  +1-650-440-3330


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]