ld: Scripts

1 
1 3 Linker Scripts
1 ****************
1 
1 Every link is controlled by a "linker script".  This script is written
1 in the linker command language.
1 
1    The main purpose of the linker script is to describe how the sections
1 in the input files should be mapped into the output file, and to control
1 the memory layout of the output file.  Most linker scripts do nothing
1 more than this.  However, when necessary, the linker script can also
1 direct the linker to perform many other operations, using the commands
1 described below.
1 
1    The linker always uses a linker script.  If you do not supply one
1 yourself, the linker will use a default script that is compiled into the
1 linker executable.  You can use the '--verbose' command line option to
1 display the default linker script.  Certain command line options, such
1 as '-r' or '-N', will affect the default linker script.
1 
1    You may supply your own linker script by using the '-T' command line
1 option.  When you do this, your linker script will replace the default
1 linker script.
1 
1    You may also use linker scripts implicitly by naming them as input
11 files to the linker, as though they were files to be linked.  ⇒
 Implicit Linker Scripts.
1 

Menu