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
- 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:
#<SYMDEFS># ARM Linker,
vvvvbbb: Last Updated:
day month date hh:mm:ss
For version 5.05, build 169:
#<SYMDEFS># ARM Linker, 5050169: Last Updated: Thu Jun
4 12:49:45 2015
Date and time of the most recent update of the
symdefs file, in the format:
The version and update information are not part of the identifying
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
- 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,
. If you
edit the file, you can use either hexadecimal or decimal formats for the address
- Type flag
A single letter to show symbol type:
- Symbol name
The symbol name.
This example shows a typical symdefs file format:
#<SYMDEFS># ARM Linker, 5050169: Last Updated:
;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
The example shows that the first line has wrapped, but it is not wrapped in the file.