Fix the alignment of PT_PHDR.
We were claiming it was aligned to 8 bytes even on 32 bit files, which
is not the case.
llvm-svn: 260102
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 2c362e7..71d774b 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -1187,7 +1187,8 @@
size_t PhdrSize = sizeof(Elf_Phdr) * Phdrs.size();
// The first phdr entry is PT_PHDR which describes the program header itself.
- setPhdr(&Phdrs[0], PT_PHDR, PF_R, FileOff, VA, PhdrSize, /*Align=*/8);
+ setPhdr(&Phdrs[0], PT_PHDR, PF_R, FileOff, VA, PhdrSize,
+ /*Align=*/sizeof(uintX_t));
FileOff += PhdrSize;
VA += PhdrSize;