[PATCH] Fix IAT (Import Address Table) alignment on AArch64

Jan Beulich jbeulich@suse.com
Tue Apr 7 10:31:26 GMT 2026


On 07.04.2026 11:48, Evgeny Karpov wrote:
> The IAT should be aligned to 8 bytes in aarch64-w64-mingw32, otherwise, it might
> result in relocation issues.

What is it that makes this different on aarch64? IOW I wonder if this is
going too far or not far enough.

> binutils/ChangeLog:
> 
> 	* dlltool.c (make_head): Update.

Please either omit the ChangeLog entry, or have it say something meaningful.

Jan

> --- a/binutils/dlltool.c
> +++ b/binutils/dlltool.c
> @@ -2735,6 +2735,11 @@ make_head (void)
>    if (!no_idata5)
>      {
>        fprintf (f, "\t.section\t.idata$5\n");
> +
> +      /* IAT (Import Address Table) should be aligned to 8 on AArch64.  */
> +      if (machine == MAARCH64)
> +	fprintf (f, "\t.align 3\n");
> +
>        if (use_nul_prefixed_import_tables)
>  	{
>  	  if (create_for_pep)



More information about the Binutils mailing list