Why is it that 5ec62e5 only disables this check for elf64 and not for elf32?
If I understand correctly from the elf specification this check should occur for PT_LOAD segments but not for other types.
For examle: PT_LOPROC does have filesz > memsz in an elf32-littleriscv compiled with the riscv-gnu-toolchain which is not against the specification in my understanding.