mb-ld linker for the MicroBlaze soft processor
provides additional options to those supported by the GNU compiler tools. The options
are summarized in this section.
- By default, the text section of the output code starts with the base address
0x28. This can be overridden by using the
-defsym _TEXT_START_ADDRoption. If this is supplied to
mb-gcccompiler, the text section of the output code starts from the given value.
You do not have to use
-defsym _TEXT_START_ADDRif you want to use the default start address set by the compiler.
This is a linker option and should be used when you invoke the linker separately. If the linker is being invoked as a part of the
mb-gccflow, you must use the following option:
- This is a linker option that removes all unwanted
imminstructions generated by the assembler. The assembler generates an
imminstruction for every instruction where the value of the immediate cannot be calculated during the assembler phase. Most of these instructions do not need an
imminstruction. These are removed by the linker when the
-relaxcommand line option is provided.
This option is required only when linker is invoked on its own. When linker is invoked through the
mb-gcccompiler, this option is automatically provided to the linker.
- This option sets the text and data section as readable and writable. It also
does not page-align the data segment. This option is required only for MicroBlaze programs. The top-level GCC compiler automatically
includes this option, while invoking the linker, but if you intend to invoke the
linker without using GCC, use this option.
The MicroBlaze linker uses linker scripts to assign sections to memory. These are listed in the following section.