| |||
| Home > Accessing Image Symbols > Accessing symbols in another image > Creating a symdefs file | |||
Use armlink option -symdefs to
produce a symdefs file. filename
armlink produces a symdefs file during a successful final link stage. It is not produced for partial linking or for unsuccessful final linking.
If does
not exist, the file is created containing all the global symbols.
If filename exists,
the existing contents of filename are
used to select the symbols that are output when armlink rewrites
the file.filename
By default, all global symbols are written to the symdefs file.
When exists,
armlink uses its contents to restrict the output to a subset of
the global symbols. To restrict the output symbols:filename
Specify -symdefs when
you are doing a nearly final link for filename. armlink
creates a symdef file image1.filename
Open in
a text editor, remove any symbol entries you do not want in the final
list, and save the file.filename
Specify -symdefs when
you are doing a final link for filename.image1
You can edit at
any time to add comments and relink filename again
to, for example, update the symbol definitions after one or more
objects use to create image1 have
changed.image1
armlink updates a symdefs file as follows:
armlink creates a temporary output file.
Lines from are
processed:filename
The comments and blank lines are copied unchanged to the temporary file.
When a symbol name is found in ,
the definition of the named symbol from the current image is output
to the temporary file.filename
If a symbol occurs in more
than once, only one definition of the symbol is placed in the temporary
file.filename
If a symbol is found in but
is not defined in the current image, no output will be produced
for that symbol.filename
If the final link is successful, is
deleted and the temporary file renamed as filename.filename