[PATCH] Fix IAT (Import Address Table) alignment on AArch64
Evgeny Karpov
evgeny.karpov@arm.com
Tue Apr 7 09:48:38 GMT 2026
The IAT should be aligned to 8 bytes in aarch64-w64-mingw32, otherwise, it might
result in relocation issues.
binutils/ChangeLog:
* dlltool.c (make_head): Update.
---
binutils/dlltool.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/binutils/dlltool.c b/binutils/dlltool.c
index 94805fcd334..6ffcfbc968f 100644
--- 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)
--
2.50.1
More information about the Binutils
mailing list