[PATCH] D41735: Use uint64_t to store the ELF sh_entsize field.
Davis, Matthew via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 5 11:08:18 PST 2018
Thanks for your response.
> From: Rafael Avila de Espindola [mailto:rafael.espindola at gmail.com]
> Sent: Friday, January 5, 2018 8:13 AM
> Subject: Re: [PATCH] D41735: Use uint64_t to store the ELF sh_entsize field.
> Do you have a need for such a large entsize? If not I would suggest producing an
> error saying that we don't support it.
My intention for representing the sh_entsize field of an ELF section header
as uint64_t is to maintain consistency between the elf.h representation,
which uses Elf64_Xword for 64bit ELFs, and can consequentially also hold
the max value for a 32bit ELF. LLVM already represents the sh_size field
as a 64bit value for the section header. Is there some limitation
that would prevent us from having such large sh_entsize fields for 64bit ELFs?
We probably should report an error if we discover a sh_size
or sh_entsize larger than what can be represented by an Elf32 or Elf64.
More information about the llvm-commits