Look at this readelf of an ELF file, the first LOAD segment has offset 0.
How is that even possible? Isn't the ELF header at offset 0?
readelf -l
Look at this readelf of an ELF file, the first LOAD segment has offset 0.
How is that even possible? Isn't the ELF header at offset 0?
readelf -l
Yes, the ELF header is at offset 0, which means that it will be loaded into the virtual memory of the process that runs the executable. Note that it's marked read-only, and not executable. The second LOAD
segment has an E
in the flags column, so that's probably the .text
section.