2.1.50. --feedback=filename

This option enables the efficient elimination of unused functions.

Syntax

--feedback=filename

Where:

filename

is the feedback file created by a previous execution of the ARM linker.

Usage

You can perform multiple compilations using the same feedback file, or specify multiple source files in a single compilation. The feedback file identifies the source file that contains the unused functions in a comment, and is not used by the compiler. The compiler places each unused function identified in the feedback file into its own ELF section in the corresponding object file.

The feedback file contains information about a previous build. Because of this:

  • The feedback file might be out of date. That is, a function previously identified as being unused might be used in the current source. The linker removes the code for an unused function only if it is not used in the current source.

    Note

    For this reason, linker feedback is a safe optimization, but there might be a small impact on code size.

  • You have to do a full compile and link at least twice to get the maximum benefit from linker feedback. However, a single compile and link using feedback from a previous build is usually sufficient.

See also

Copyright © 2007, 2010 ARM Limited. All rights reserved.ARM DUI 0348A
Non-Confidential