The mb-ld linker for the MicroBlaze soft processor provides additional options to those supported
by the GNU compiler tools.
-
-defsym _TEXT_START_ADDR=value - 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 tomb-gcccompiler, the text section of the output code starts from the given value.You do not have to use
-defsym _TEXT_START_ADDRif you are using the default start address set by the compiler.This is a linker option 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:-Wl,-defsym -Wl,_TEXT_START_ADDR=value -
-relax - This is a linker option that removes all unwanted
imminstructions generated by the assembler. The assembler generates animminstruction for every instruction where it cannot determine the value of the immediate one. Most of these instructions do not need animminstruction. These are removed by the linker when the-relaxcommand line option is provided.The assembler only requires this option when invoking the linker on its own. When the linker is invokes through the
mb-gcccompiler, the system automatically provides this option. -
-N - Required only for MicroBlaze programs,
this option sets the text and data section as readable and writable. It does not
page-align the data segment. The top-level GCC compiler automatically includes
this option while invoking the linker. If you intend to invoke the linker
without using GCC, use this option.
The MicroBlaze linker uses linker scripts to assign sections to memory. See the following for details.