This is the mail archive of the 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] PR gold/19163: zero-out ABS64/32/16/ in .rela.dyn.

> 2015-10-26  Han Shen  <>
>         PR gold/19163 - zero out ABS64/32/16 in .rela.dyn.
>         * (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.

It doesn't seem necessary to me to make a list of all those
relocations, then apply them, then zero them out. Rather than make a
list, how about just skipping the relocation when applicable?

I'd also like to see this under the control of an option, so that we
only need to use it for as long as the buggy dynamic linkers are out

The attached patch adds a --no-apply-dynamic-relocs flag. When set,
Relocate::relocate() will skip applying the link-time relocation for
those cases where we've generated an absolute dynamic relocation.
Please give this a try; if it works, I'd prefer this approach.


2015-10-28  Cary Coutant  <>

        * (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.

Attachment: pr19163-2.patch
Description: Binary data

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