Keil Logo

RESOLVE steering file command

10.6 RESOLVE steering file command

Matches specific undefined references to a defined global symbol.


RESOLVE pattern AS defined_pattern
is a string, optionally including wildcard characters (either * or ?), that matches zero or more undefined global symbols. If pattern does not match any undefined global symbol, the linker ignores the command. The operand can match only undefined global symbols.
is a string, optionally including wildcard characters, that matches zero or more defined global symbols. If defined_pattern does not match any defined global symbol, the linker ignores the command. You cannot match an undefined reference to an undefined symbol.


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:
extern int foo;
extern void MP3_Init(void);
extern void MP3_Play(void);
int main(void)
  int x = foo + 1;
  return x;

int foobar;
void MyMP3_Init()
void MyMP3_Play()
Create a steering file, ed.txt, containing the line:
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() and MP3_Play()) are matched to the definitions in file2.o (foobar, MyMP3_Init() and MyMP3_Play() respectively), as specified by the steering file ed.txt.
  • The RESOLVE command in ed.txt matches the MP3 functions and the --unresolved option matches any other remaining references, in this case, foo to foobar.
  • The output symbol table, whether it is an image or a partial object, does not contain the symbols foo, MP3_Init or MP3_Play.
Non-ConfidentialPDF file icon PDF versionARM DUI0377H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.