SPNU118Z September 1995 – March 2023 66AK2E05 , 66AK2H06 , 66AK2H12 , 66AK2H14 , AM1705 , AM1707 , AM1802 , AM1806 , AM1808 , AM1810 , AM5K2E04 , OMAP-L132 , OMAP-L137 , OMAP-L138 , SM470R1B1M-HT , TMS470R1A288 , TMS470R1A384 , TMS470R1A64 , TMS470R1B1M , TMS470R1B512 , TMS470R1B768
When a hole exists in an initialized output section, the linker must supply raw data to fill it. The linker fills holes with a 32-bit fill value that is replicated through memory until it fills the hole. The linker determines the fill value as follows:
SECTIONS
{ outsect:
{
file1.c.obj(.text)
file2.c.obj(.bss)= 0xFF00FF00 /* Fill this hole with 0xFF00FF00 */
}
}
SECTIONS
{ outsect:fill = 0xFF00FF00 /* Fills holes with 0xFF00FF00 */
{
. += 0x0010; /* This creates a hole */
file1.c.obj(.text)
file1.c.obj(.bss) /* This creates another hole */
}
}
SECTIONS { .text: { .= 0x0100; } /* Create a 100 word hole */ }
Now invoke the linker with the --fill_value option:
armcl --run_linker --fill_value=0xFFFFFFFF link.cmd
This fills the hole with 0xFFFFFFFF.
Whenever a hole is created and filled in an initialized output section, the hole is identified in the link map along with the value the linker uses to fill it.