|ARM Technical Support Knowledge Articles|
Applies to: A251 Macro Assembler
Information in this article applies to:
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.
Article last edited on: 2004-06-09 13:15:26
Did you find this article helpful? Yes No
How can we improve this article?