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.

> +      if (!parameters->options().apply_dynamic_relocs()
>>> Han: we need to test if gsym is NULL, in one of my cases, gsym is NULL and gold crashes.

Yes, sorry, I should have caught that.

> +          && parameters->options().output_is_position_independent()
> +          && gsym->needs_dynamic_reloc(reloc_property->reference_flags())
> +          && !gsym->can_use_relative_reloc(false))
> +        // We have generated an absolute dynamic relocation, so do not
> +        // apply the relocation statically. (Works around bugs in older
> +        // Android dynamic linkers.)
>>> Han: do we need to explicitly write zeros to this location instead of just do nothing? (Although I've checked the values of the resulting binary, the location contains all zeros)

Not as long as the compiler writes zeroes (which it should).

I've committed the attached patch.


2015-11-05  Cary Coutant  <>

        PR gold/19163
        * (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-3.patch
Description: Binary data

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