For AArch64 in some cases/some distributions ld uses 64K alignment of LOAD segments by default.
Reviewed By: yota9, maksfb
Differential Revision: https://reviews.llvm.org/D119267
void adjustCodePadding();
/// Regular page size.
- static constexpr unsigned RegularPageSize = 0x1000;
+ unsigned RegularPageSize{0x1000};
+ static constexpr unsigned RegularPageSizeX86 = 0x1000;
+ static constexpr unsigned RegularPageSizeAArch64 = 0x10000;
/// Huge page size to use.
static constexpr unsigned HugePageSize = 0x200000;
InstPrinter(std::move(InstPrinter)), MIA(std::move(MIA)),
MIB(std::move(MIB)), MRI(std::move(MRI)), DisAsm(std::move(DisAsm)) {
Relocation::Arch = this->TheTriple->getArch();
+ RegularPageSize = isAArch64() ? RegularPageSizeAArch64 : RegularPageSizeX86;
PageAlign = opts::NoHugePages ? RegularPageSize : HugePageSize;
}