Keil Logo

About linker feedback

4.5 About linker feedback

Linker feedback is a collaboration between the compiler and linker that can increase the amount of unused code that can be removed from an ELF image.

The feedback option produces a text file containing a list of unused functions, and functions that have been inlined by the linker. This information can be fed back to the compiler, which can rebuild the objects, placing these functions in their own sections. These sections can then be removed by the linker during usual unused section elimination.
The feedback file has the following format:
;#<FEEDBACK># ARM Linker, N.nn [Build num]: Last Updated: day mmm dd hh:mm:ss yyyy
;FILE filename.o
unused_function <= USED 0
inlined_function <= LINKER_INLINED
The feedback file contains an entry for each object file. Each entry contains:
  • The object filename specified as a comment:
    ;FILE filename.o
  • A list of the functions in that file that are not used:
    unused_function <= USED 0
  • A list of the functions in that file that are inlined by the linker:
    inlined_function <= LINKER_INLINED
To use linker feedback, specify --feedback file on the linker and compiler command lines.


The compiler issues a warning message if no feedback file exists. Therefore, you might want to leave the --feedback file option off the first invocation of the compiler.
Additional feedback options are provided by the linker:
  • If you are using scatter-loading then an executable ELF image cannot be created if your code does not fit into the region limits described in your scatter file. In this case use the --feedback_image=option command-line option.
  • To control the information that the linker puts into the feedback file, use the --feedback_type=type command-line option. You can control whether or not to list functions that require interworking or unused functions.
Non-ConfidentialPDF file icon PDF versionARM DUI0377H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.