This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [gold][aarch64] PR gold/19163: zero-out ABS64/32/16/ in .rela.dyn.
- From: Han Shen <shenhan at google dot com>
- To: binutils <binutils at sourceware dot org>, Cary Coutant <ccoutant at gmail dot com>
- Cc: Luis Lozano <llozano at google dot com>, Dimitry Ivanov <dimitry at google dot com>
- Date: Mon, 26 Oct 2015 16:59:58 -0700
- Subject: Re: [gold][aarch64] PR gold/19163: zero-out ABS64/32/16/ in .rela.dyn.
- Authentication-results: sourceware.org; auth=none
- References: <CACkGtrgmYrTDr+VdeF5SE2sNY_mzGFTJ+g_n8Rxz_gcy6uzFpg at mail dot gmail dot com>
Oh, forgot to add gold/ChangeLog -
2015-10-26 Han Shen <shenhan@google.com>
PR gold/19163 - zero out ABS64/32/16 in .rela.dyn.
* aarch64.cc (AArch64_relobj::ZeroOutRecord): New data struct.
(AArch64_relobj::zero_out_list_): New member.
(AArch64_relobj::ZeroOutIter): New typedef.
(AArch64_relobj::ZeroOutList): Likewise.
(AArch64_relobj::zero_out_relocs): New method.
(AArch64_relobj::do_relocate_sections): Add hook to call
zero_out_relocs.
(AArch64_relocate_functions::zero_out): New helper method.
(Target_aarch64::Scan::global): Record global symbols that are
added to .rela.dyn.
On Mon, Oct 26, 2015 at 4:53 PM, Han Shen <shenhan@google.com> wrote:
> Hi Cary, this is the patch to fix PR gold/19163 (and gold/19169).
>
> Android bionic dynamic linker has bugs dealing with ABS64/32/16 in the
> .rela.dyn section. It was fixed last week here -
> https://android-review.googlesource.com/#/c/176902/2/linker/linker.cpp
>
> The problem here is that that L and M release will still have this
> bug. So here is the patch to zero out the relocation values in these
> affected relocs (AARCH64_ABS64/32/16).
>
> Tested - build O2/O0 on x86_64 machine. build O2 on aarch64 machine.
> passed gold dev unit test cases.
> manually checked the value in .rela.dyn, so that ABSxx
> are all zero.
> manually verified case in PR gold/19169
>
>
> Ok for trunk?
>
> Thanks,
> Han
--
Han Shen | Software Engineer | shenhan@google.com | +1-650-440-3330