Alpha DT_RELA

Richard Henderson rth@redhat.com
Mon Feb 20 20:19:00 GMT 2017


On 02/20/2017 09:31 PM, Alan Modra wrote:
> Hi Richard,
> Most modern targets supported by binutils do not emit DT_RELA when
> DT_RELASZ is zero, ie. you have .rela.plt relocs but no .rela.dyn
> relocs.  This brings Alpha into line with the rest.  The ELF spec is
> arguable regarding this practice so you might not see this as a
> desirable change (but see PR21181).  OK?
>
> diff --git a/bfd/ChangeLog b/bfd/ChangeLog
> index 3e90624..b58ed37 100644
> --- a/bfd/ChangeLog
> +++ b/bfd/ChangeLog
> @@ -1,3 +1,8 @@
> +2017-02-17  Alan Modra  <amodra@gmail.com>
> +
> +	* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
> +	DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
> +
>  2017-02-20  Alan Modra  <amodra@gmail.com>
>

Looks good.  Thanks for fixing this up.


r~



More information about the Binutils mailing list