summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Writer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Writer.cpp')
-rw-r--r--lld/ELF/Writer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 2c362e7f428..71d774bb0e2 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -1187,7 +1187,8 @@ template <class ELFT> void Writer<ELFT>::assignAddresses() {
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;
OpenPOWER on IntegriCloud