Keil Logo

Symdefs file format

6.5.4 Symdefs file format

A symdefs file defines symbols and their values.

The file consists of:
Identification line
The identification line in a symdefs file comprises:
  • An identifying string, #<SYMDEFS>#, which must be the first 11 characters in the file for the linker to recognize it as a symdefs file.
  • Linker version information, in the format:
    ARM Linker, vvvvbbb:
  • Date and time of the most recent update of the symdefs file, in the format:
    Last Updated: day month date hh:mm:ss year
For example, for version 5.05, build 169:
#<SYMDEFS># ARM Linker, 5050169: Last Updated: Thu Jun 4 12:49:45 2015
The version and update information are not part of the identifying string.
You can insert comments manually with a text editor. Comments have the following properties:
  • The first line must start with the special identifying comment #<SYMDEFS>#. This comment is inserted by the linker when the file is produced and must not be manually deleted.
  • Any line where the first non-whitespace character is a semicolon (;) or hash (#) is a comment.
  • A semicolon (;) or hash (#) after the first non-whitespace character does not start a comment.
  • Blank lines are ignored and can be inserted to improve readability.
Symbol information
The symbol information is provided on a single line, and comprises:
Symbol value
The linker writes the absolute address of the symbol in fixed hexadecimal format, for example, 0x00008000. If you edit the file, you can use either hexadecimal or decimal formats for the address value.
Type flag
A single letter to show symbol type:
ARM code
Thumb code
Symbol name
The symbol name.


This example shows a typical symdefs file format:
#<SYMDEFS># ARM Linker, 5050169: Last Updated: Date
;value type name, this is an added comment
0x00008000 A __main
0x00008004 A __scatterload
0x000080E0 T main
0x0000814D T _main_arg
0x0000814D T __argv_alloc
0x00008199 T __rt_get_argv
   # This is also a comment, blank lines are ignored
0x0000A4FC D __stdin
0x0000A540 D __stdout
0x0000A584 D __stderr
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.