| |||
| Home > Accessing Image Symbols > Accessing symbols in another image > Symdefs file format | |||
The symdefs file contains symbols and their values. Unlike other object files, however, it does not contain any code or data.
The file consists of an identification line, optional comments, and symbol information as shown in Example 4.3.
Example 4.3. Symdefs file format
#<SYMDEFS># ARM Linker, RVCT2.2 [Build 435]: Last Updated: Wed May 04 12:25:25 2005 ;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
If the first 11 characters in the text file are #<SYMDEFS>#,
the linker recognizes the file as a symdefs file.
The identifying string is followed by linker version information, and date and time of the most recent update of the symdefs file. The version and update information are not part of the identification 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 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.
The symbol information is provided by the address, type, and name of the symbol on a single line:
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.
A single letter to show symbol type:
ARM code
Thumb code
Data
Number.
The symbol name.