When the ELF file loading process, .text
section is mapped to a memory segment. I would like to know:
- What is the maximum value of a segment size ?
- What is the maximum value of
.text
section size ?
Elf32 or Elf64?
According to ELF specification, for Elf32 the section size is stored in 32 bits (Elf32_Word
). So, the maximum size would be 4294967295 bytes (4 GiB).
2147483647 bytes (4 Gb)
is incoherent