<div dir="ltr">When we create an output section, its alignment is set to the largest alignment of input sections, so as long as you have a linker-synthesized .note.gnu.build-id section, it sets to at least 4 after this change. If you do not pass --build-id to the linker, it is more like a garbage-in garbage-out situation. If a tool that generates object files decided to use alignment 1 or 2 for .note sections for whatever reason, I think the linker should respect that instead of being too picky and complaining about input files.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 30, 2017 at 2:35 PM, Joerg Sonnenberger via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Oct 30, 2017 at 01:31:58PM -0700, Roland McGrath via llvm-commits wrote:<br>
> Despite what the so-called "spec" says, in actual fact, the note header's<br>
> fields are 32-bit in both ELFCLASS32 and ELFCLASS64 and the expected<br>
> alignment is always 4.<br>
<br>
</span>I would go one step further and throw a warning if a note section is not<br>
a multiple of 4.<br>
<br>
Joerg<br>
<div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div>