The RESOLVE command matches specific undefined references to a defined global symbol.
RESOLVE
pattern
AS defined_pattern
where:
pattern
is a string, optionally including wildcard characters (either
*
or?
), that matches zero or more undefined global symbols. If
does not match any undefined global symbol, the linker ignores the command. The operand can match only undefined global symbols.pattern
defined_pattern
is a string, optionally including wildcard characters, that matches zero or more defined global symbols. If
does not match any defined global symbol, the linker ignores the command. You cannot match an undefined reference to an undefined symbol.defined_pattern
RESOLVE is an extension of the existing armlink --unresolved
command-line
option. The difference is that --unresolved
enables
all undefined references to match one single definition, whereas RESOLVE enables
more specific matching of references to symbols.
The undefined references are removed from the output symbol table.
RESOLVE works when performing partial-linking and when linking normally.
You might have two files file1.c
and file2.c
,
as shown in the following example:
Create a steering file, ed.txt
, containing
the line:
RESOLVE MP3* AS MyMP3*
.
Enter the following command:
armlink file1.o file2.o --edit ed.txt --unresolved foobar
This command has the following effects:
The references from
file1.o
(foo
,MP3_Init()
andMP3_Play()
) are matched to the definitions infile2.o
(foobar
,MyMP3_Init()
andMyMP3_Play()
respectively), as specified by the steering fileed.txt
.The RESOLVE command in
ed.txt
matches theMP3
functions and the--unresolved
option matches any other remaining references, in this case,foo
tofoobar
.The output symbol table, whether it is an image or a partial object, does not contain the symbols
foo
,MP3_Init
orMP3_Play
.
- Concepts
Using the Linker:
- Reference