Position-Independent Code And Data - Intel i960 User Manual

Processor compiler
Hide thumbs Also See for i960:
Table of Contents

Advertisement

Position Independence
and Reentrancy
This chapter describes reentrancy and position-independence. Use it for
writing i960 processor applications that require position-independent or
reentrant programs. Position independence enables relocation of both the
.text
independence, position-independent addressing modes, and reentrancy.

Position-independent Code and Data

Position independence refers to an application that can be relocated when
loaded. The application can be loaded at various addresses, but the code
and data do not move during execution. This feature enables creation of
programs for specific EPROMs used in a system.
The ic960 driver's
gcc960 driver's
position-independent code and data. For more information about
command-line options, see Chapters 2 (gcc960) and 3 (ic960).
Position-independent Data
When the position-independent data option is specified, references to
variables in the program are made relative to
program must supply a data address bias in the position-independent data
bias register (
value in
be read-only for the entire program.
and
sections. The following sections describe position
.data
option with its arguments
G
,
and
mpic
mpid
). For all accesses to statically allocated variables, the
g12
is used to calculate the effective address. Register
g12
,
and
pc
pd
options, control generation of
mpid-safe
. Initialization code for a
g12
9
, or the
pr
must
g12
9-1

Advertisement

Table of Contents
loading

Table of Contents