C3.4 Linker support for creating demand-paged files
The linker provides features for you to create files that are memory mapped.
In operating systems that support virtual memory, an ELF file can be loaded by
mapping the ELF files into the address space of the process loading the file. When a
virtual address in a page that is mapped to the file is accessed, the operating
system loads that page from disk. ELF files that are to be used this way must
conform to a certain format.
Use the --paged command-line option to enable demand paging mode.
This helps produce ELF files that can be demand paged efficiently.
The basic constraints for a demand-paged ELF file are:
There is no difference between the load and execution address for any output section.
All PT_LOAD Program Headers have a minimum alignment,
pt_align, of the page size for the operating
system.
All PT_LOAD Program Headers have a file offset, pt_offset,
that is congruent to the virtual address (pt_addr) modulo
pt_align.
When you specify --paged:
The operating system page size is controlled by the
--pagesize command-line option.
The linker attempts to place the ELF Header and Program Header in the first
PT_LOAD program header, if space is available.
Example
This is an example of a demand paged scatter file:
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.