4.14.3 Linker Scripts

Linker scripts are used to instruct the linker how to position sections in memory. There are five different variants of these scripts, tabulated below. These are selected based on the options passed to the linker.

Table 4-16. Linker script variants
Script Extension Controlling linker option Linker operation
.x default
.xr -r perform no relocation
.xu -Ur resolve references to constructors
.xn -n set text to be read-only
.xbn -N Set the text and data sections to be readable and writable.