Specifications

Embedded System Tools Guide (EDK 6.2i) www.xilinx.com 311
UG111 (v1.4) January 30, 2004 1-800-255-7778
MicroBlaze Processor
R
Different Base Address, Non-contiguous User Address Space
The users can place different components of their program on different memories. For
example, on MicroBlaze systems with non-contiguous LMB and OPB memories, users can
keep their code on LMB memory and the data on OPB memory. The users can also create
systems which have contiguous address space for LMB and OPB memory, but having
holes in the OPB address space.
All such user programs need creation of non-contiguous executables. To facilitate creation
of non-contiguous executable, linker scripts have to be modified. The default linker script
provided with the MicroBlaze Distribution Kit will place all user code and data in one
contiguous address space.
Linker scripts are defined in later sections in this document.
For more details on linker options see Chapter 11, “GNU Compiler Tools.
Object-file Sections
The sections of an executable file are created by concatenating the corresponding sections
in an object (.o) file. The various sections in the object file are given in Figure 22-3.
.text
This section contains executable code. This section has the x (executable), r (read-only) and
i (initialized) flags.
.rodata
This section contains read-only data of a size more than 8 bytes (default). The size of the
data put into this section can be changed with an mb-gcc -G option. All data in this section
is accessed using absolute addresses. This section has the r (read-only) and the i
(initialized) flags. For more details refer to Chapter 4, “MicroBlaze Application Binary
Interface” (ABI) in the MicroBlaze Processor Reference Guide.
.sdata2
This section contains small read-only data (size less than 8 bytes). The size of the data
going into this section can be changed with an mb-gcc -G option. All data in this section is
accessed with reference to the read-only small data anchor. This ensures that all data in the
.sdata2 section can be accessed using a single instruction (A preceding imm instruction
will never be necessary). This section has the r (read-only) and the i (initialized) flags. For
more details refer to Chapter 4, “MicroBlaze Application Binary Interface” (ABI) in the
MicroBlaze Processor Reference Guide.
.data
This section contains read-write data of a size more than 8 bytes (default). The size of the
data going into this section can be changed with an mb-gcc -G option. All data in this