mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-03 19:32:35 +00:00
[BOLT] Adjust Shdr alignment
Shdr's are not necesarily size 2^n, and there is no reason to align to that boundary if they are. Differential Revision: https://reviews.llvm.org/D148666
This commit is contained in:
parent
31deca465f
commit
f2f0411924
@ -4765,9 +4765,10 @@ void RewriteInstance::patchELFSectionHeaderTable(ELFObjectFile<ELFT> *File) {
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user