2.1.3. Summary of linker options

This section gives a summary of linker command-line options. The options are arranged in alphabetical order within functional groups.

Accessing help and information

To get information on the available command-line options use:


--help

To see the tool version number use:


--vsn

Specifying an input file list

To define input files passed to the linker use:


--input-file_list
--libpath pathlist
--scanlib | --no_scanlib
--userlibpath pathlist

You can use the POSIX option -- to specify that all subsequent arguments are not treated as command switches. For example, to link a file named -ifile_1 type:


armlink -- -ifile_1

Controlling linker behavior

To define how objects are linked together use:


--match crossmangled
--strict
--unresolved symbol

Specifying the output type and the output filename

Name the output file using the following option:


--output file 

Use the following option to create a partially-linked object instead of an executable image:


--partial

Use the following option to specify the format of the shared object or executable file:


--shared
--sysv

Use the following option to create a relocatable object:


--reloc

Specifying memory map information for the image

Use the following options to specify simple memory maps:


--fpic
--ro-base address
--rw-base address
--ropi
--rwpi
--rosplit
--split

Alternatively, for more complex images, use the options:


--pad num
--scatter file

If you use the --scatter option, you must provide a scatter-loading description file and a reimplementation of the __user_initial_stackheap() function.

Scatter-loading is described in Chapter 5 Using Scatter-loading Description Files.

The memory map options cannot be used for partial linking because they specify the memory map of an executable image. See RealView Compilation Tools v2.2 Developer Guide for more information.

Controlling debug information

To control debug information in the image use:


--debug | --no_debug
--no_bestdebug | --bestdebug

Controlling image contents

To control miscellaneous factors affecting the image contents use:


--cppinit symbol
--datacompressor on|off|list|id
--dynamiclinker name
--edit file-list
--entry location
--exceptions | --no_exceptions
--exceptions_tables=action
--fini symbol
--first section-id
--force_so_throw
--init symbol
--inline
--keep section-id
--last section-id
--linux_abitag version-id
--locals | --no_locals
--no_branchnop
--pt_arm_exidx
--remove | --no_remove
--soname name
--startup symbol
--symver_script file
--symver_soname
--tailreorder
--vfemode=mode

Controlling veneer generation

To control how veneers are generated use:


--no_inlineveneer
--no_veneershare

Specifying Byte Addressing mode

To control Byte Addressing mode use:


--be8
--be32

Generating image-related information

To control how to extract and present information about the image use:


--callgraph
--feedback file
--info topics
--list_mapping_symbols
--mangled | --unmangled
--map
--symbols
--symdefs file
--xref
--xrefdbg
--xreffrom object(section)
--xrefto object(section)

With the exception of --callgraph, the linker prints the information you request on the standard output stream, stdout, by default. You can redirect the information to a text file using the --list command-line option.

For --callgraph, the information is saved as an HTML file named output_name.htm. This is saved in the same directory as the generated image.

Controlling linker diagnostics

To control how the linker emits diagnostics:


--diag_style arm|ide
--diag_suppress taglist
--diag_warning taglist
--errors file
--list file
--verbose

Using a via file

Use the following option to specify a via file containing additional command-line arguments to the linker:


--via file

See the section on via files in RealView Compilation Tools v2.2 Compiler and Libraries Guide for more information.

Copyright © 2002-2005 ARM Limited. All rights reserved.ARM DUI 0206F
Non-Confidential