https://bugs.llvm.org/show_bug.cgi?id=39044
Bug ID: 39044
Summary: elf::mergeSections doesn't set alignment to the power
of 2
Product: lld
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: ELF
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
In elf::mergeSections (ELF/SyntheticSections.cpp), Alignment is calculated as
uint32_t Alignment = std::max<uint32_t>(MS->Alignment, MS->Entsize);
When MS->Entsize is larger and is not aligned to power of 2 (seems not
required?), the new alignment will fail the check in
InputSectionBase::InputSectionBase (ELF/InputSection.cpp)
uint32_t V = std::max<uint64_t>(Alignment, 1);
if (!isPowerOf2_64(V))
fatal(toString(File) + ": section sh_addralign is not a power of 2");
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs