<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Apr 29, 2016 at 2:21 PM, Rafael EspĂ­ndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</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 29 April 2016 at 16:40, Sean Silva <<a href="mailto:chisophugis@gmail.com">chisophugis@gmail.com</a>> wrote:<br>
><br>
><br>
> On Fri, Apr 29, 2016 at 10:28 AM, Rui Ueyama via llvm-commits<br>
> <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
>><br>
>> Can you just set 16 and 32 instead of sizeof(ElfHalf) and sizeof(ElfWord)?<br>
>> I don't really memorize these types.<br>
><br>
><br>
> The spec is defined in terms of them, hopefully they are familiar?<br>
<br>
</span>They are also how the types are defined in ELFTypes.h. The sections<br>
should have that alignment because they contain, respectively, an<br>
Elf_Half and an Elf_Word.<br>
<br>
Do you feel strongly about changing it?<br></blockquote><div><br></div><div>Sort of. We don't use Elf_* types in most places. For example, st_shndx is defined as Half, but I think we simply handle that as uint16_t (or ulittle16_t where endianess matters). So is most places where we are using uintX_t.</div></div></div></div>