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.

Comments

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:

A

ARM code

T

Thumb code

D
Data
N
Number.
Symbol name
The symbol name.

Example

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
0xFFFFFFFD N __SIG_IGN
Non-ConfidentialPDF file icon PDF versionARM DUI0474M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.