Keil Logo

A251: Absolute Code Requires Linker for Symbol Resolution

Information in this article applies to:

  • C251 Version 2.14


My project consists of a single assembly source file in which there is one code segment that has been absolutely located.

When I assemble my file with the A51 assembler, it generates an absolute object file that does not require the linker. Here is a snippet from the listing file for a function call showing the LCALL opcode and the address of the call:

                      34      ; SOURCE LINE # 7
1000 121009           35      LCALL  func1

However, when I assemble my file with the A251 assembler and the NOMOD251 directive, the object file produced requires the linker to resolve the symbols. The following snippet from the listing file shows the same function call, however, the address is yet to be inserted and the 'F' indicates a linker fix-up is required for the address:

                         34                             ; SOURCE LINE # 7
001000 120000     F      35             LCALL func1

Is this a bug in the A251 assembler?


The A51 assembler is designed to work without a linker if you just have one assembly source file in your project. If there are no unresolved externals in this assembly module, you don't have to link this module. You can directly feed this object file into the OH51 Object To Hex Converter.

Since nearly every project consists of multiple modules and libraries (C and assembly), the A251 assembler was designed in a different way. The A251 assembler always requires the linker to resolve all the symbols, even for one module.

There is no disadvantage to this, except that the addresses of the symbols have to be looked up in the map file rather than the listing file.

Last Reviewed: Wednesday, September 21, 2016

Did this article provide the answer you needed?
Not Sure
  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.