9.2.24 -mreserve
The link shell will process this option by creating a temporary linker script that will define a section to reserve a certain range of memory:
[start_address:end_address].
Syntax:
-mreserve=memory_region@start_address:end_address
The section created will have the name pattern:
reserve_ memory_region_ start_address
The address of the section will be: start_address
The length of the section will be: end_address - start_address + 1
Example:
-mreserve=data@0x1000:0x1050
A temporary linker script with the following content will be created:
SECTIONS {
reserve_data_0x1000 0x1000: {
SHORT(0x0);
. = 0x51;
}
}
Multiple -mreserve
options can be passed to the linker to reserve multiple ranges.