[PATCH] D38907: Give .note.gnu.build-id section alignment 4

Roland McGrath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 13 16:06:54 PDT 2017


mcgrathr created this revision.
mcgrathr added a project: lld.
Herald added a subscriber: emaste.

All SHT_NOTE sections should have minimum alignment 4.


Repository:
  rL LLVM

https://reviews.llvm.org/D38907

Files:
  ELF/SyntheticSections.cpp


Index: ELF/SyntheticSections.cpp
===================================================================
--- ELF/SyntheticSections.cpp
+++ ELF/SyntheticSections.cpp
@@ -316,7 +316,7 @@
 }
 
 BuildIdSection::BuildIdSection()
-    : SyntheticSection(SHF_ALLOC, SHT_NOTE, 1, ".note.gnu.build-id"),
+    : SyntheticSection(SHF_ALLOC, SHT_NOTE, 4, ".note.gnu.build-id"),
       HashSize(getHashSize()) {}
 
 void BuildIdSection::writeTo(uint8_t *Buf) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38907.118983.patch
Type: text/x-patch
Size: 444 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171013/4cf28223/attachment.bin>


More information about the llvm-commits mailing list