Keil Logo

Resolving Externals

When you compile or assemble a source file, external references are created for variables and functions that are accessed but declared in different source files. In addition, public symbols are created in the object module for the variables and functions declared in that source file.

The linker uses public symbols to resolve the addresses of external references. For each external reference, a public symbol with the same name and attributes must exist.

The linker builds a table of all public and external symbols it encounters. External references are resolved with public references (as long as the names match and the symbol attributes correspond). The linker reports an error if the symbol types of an external and public symbol do not match. The linker also reports an error if no public symbol is found for an external reference.

The absolute addresses of the public symbols are resolved after the location of the segments is determined.

  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.