[PATCH] D148666: [BOLT] Adjust Shdr alignment
Nathan Sidwell via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 19 12:52:19 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf2f041192418: [BOLT] Adjust Shdr alignment (authored by urnathan).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148666/new/
https://reviews.llvm.org/D148666
Files:
bolt/lib/Rewrite/RewriteInstance.cpp
Index: bolt/lib/Rewrite/RewriteInstance.cpp
===================================================================
--- bolt/lib/Rewrite/RewriteInstance.cpp
+++ 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) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148666.515048.patch
Type: text/x-patch
Size: 767 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230419/53cf0b5d/attachment.bin>
More information about the llvm-commits
mailing list