diff --git a/bolt/lib/Rewrite/RewriteInstance.cpp b/bolt/lib/Rewrite/RewriteInstance.cpp --- a/bolt/lib/Rewrite/RewriteInstance.cpp +++ b/bolt/lib/Rewrite/RewriteInstance.cpp @@ -4765,9 +4765,10 @@ dbgs() << " " << I << " -> " << NewSectionIndex[I] << '\n'; ); - // Align starting address for section header table. + // Align starting address for section header table. There's no architecutal + // need to align this, it is just for pleasant human readability. uint64_t SHTOffset = OS.tell(); - SHTOffset = appendPadding(OS, SHTOffset, sizeof(ELFShdrTy)); + SHTOffset = appendPadding(OS, SHTOffset, 16); // Write all section header entries while patching section references. for (ELFShdrTy &Section : OutputSections) {