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

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 13 23:30:42 PDT 2017


Testcase?

Should it be 8 on 64 bit cpus?

Cheers,
Rafael

Roland McGrath via Phabricator via llvm-commits
<llvm-commits at lists.llvm.org> writes:

> 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) {
>
>
> 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) {
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list