[lld] r268070 - Fix the alignment of the version info.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 29 15:05:57 PDT 2016


On 29 April 2016 at 17:50, Rui Ueyama <ruiu at google.com> wrote:
> On Fri, Apr 29, 2016 at 2:21 PM, Rafael EspĂ­ndola
> <rafael.espindola at gmail.com> wrote:
>>
>> On 29 April 2016 at 16:40, Sean Silva <chisophugis at gmail.com> wrote:
>> >
>> >
>> > On Fri, Apr 29, 2016 at 10:28 AM, Rui Ueyama via llvm-commits
>> > <llvm-commits at lists.llvm.org> wrote:
>> >>
>> >> Can you just set 16 and 32 instead of sizeof(ElfHalf) and
>> >> sizeof(ElfWord)?
>> >> I don't really memorize these types.
>> >
>> >
>> > The spec is defined in terms of them, hopefully they are familiar?
>>
>> They are also how the types are defined in ELFTypes.h. The sections
>> should have that alignment because they contain, respectively, an
>> Elf_Half and an Elf_Word.
>>
>> Do you feel strongly about changing it?
>
>
> 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.

OK. How about sizeof(uint16_t) and sizeof(uint32_t) as compromises?

Cheers,
Rafael


More information about the llvm-commits mailing list