The 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 filelinker version information, in the format:
ARM Linker,
N.nn
[Buildnum
]:date and time of the most recent update of the symdefs file, in the format:
Last Updated:
Date
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.
This example shows a typical symdefs file format:
#<SYMDEFS># ARM Linker, 5.01 [Buildnum
]: 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