You copied the Doc URL to your clipboard.

Typical use cases for using ld scripts with armlink

These are typical use cases for using ld scripts with armlink.

Wrapping libraries

Some libraries have a dynamic and static part. An ld script loads both libraries in the correct order with the INPUT command, for example:


This script instructs the linker to load libstatic.a then

Partial linking with the --ldpartial option

An ld script can be given to control how the linker combines sections, for example:

    .text :0

This script instructs the linker to combine mysection and all the .text sections into a single .text output section.

Fine control over an ARM linux link

You might want to combine sections together in a different order to that given by the default linker script. Also, you might want the linker to define symbols at specific addresses. This information can be given by a custom linker script.


To successfully produce a file that can be run on ARM Linux your image must include some output sections to contain the meta-data that the dynamic loader can use to load the file. It is recommended that you start with one of the example scripts and modify it to suit your purpose.