ELF segment cell size compared to file size

I read several ELF specifications but have not yet found the answers to the following questions.

1) If the size of the segment memory is larger than the size of the segment file, should the ELF segment boot element fill the segment in memory with zeros, as indicated by memsize?

2) Could there be a case when the section should be filled with a constant other than zero, that is, in the general case, the "constant filling" section?

3) What is the correct way to identify the .const segment in an elf executable?

The meaning of the flags for each section does not have such information and, apparently, is limited. I have seen ELF segment loader implementations where they do not load segments with a file size of zero at all.

Thank!

+4
source share

Source: https://habr.com/ru/post/1542242/


All Articles