Increase the default code section alignment to 64 KB for AArch64 targets (#3424)

Some platforms such as AArch64 Linux support different memory page
sizes, so we need to be conservative when choosing the code section
alignment (which is equal to the page size) by using the maximum.

Copyright (c) 2021, Arm Limited.
This commit is contained in:
Anton Kirilov
2021-10-07 18:49:40 +01:00
committed by GitHub
parent ba3ce2280a
commit a986cf2438
2 changed files with 5 additions and 1 deletions

View File

@@ -290,6 +290,9 @@ impl<'a> dyn TargetIsa + 'a {
| OperatingSystem::Tvos,
Architecture::Aarch64(..),
) => 0x4000,
// 64 KB is the maximal page size (i.e. memory translation granule size)
// supported by the architecture and is used on some platforms.
(_, Architecture::Aarch64(..)) => 0x10000,
_ => 0x1000,
}
}