94
Chapter 14. CRIS Dependent Features
14.3.1. Special Characters
The character
#
is a line comment character. It starts a comment if and only if it is placed at the
beginning of a line.
A
;
character starts a comment anywhere on the line, causing all characters up to the end of the line
to be ignored.
A
@
character is handled as a line separator equivalent to a logical new line character (except in a
comment), so separate instructions can be specified on a single line.
14.3.2. Symbols in position independent code
When generating position independent code (SVR4 PIC) for use in cris axis linux gnu shared li 
braries, symbol suffixes are used to specify what kind of run time symbol lookup will be used, ex 
pressed in the object as different relocation types. Usually, all absolute symbol values must be located
in a table, the global offset table, leaving the code position independent; independent of values of
global symbols and independent of the address of the code. The suffix modifies the value of the sym 
bol, into for example an index into the global offset table where the real symbol value is entered, or
a PC relative value, or a value relative to the start of the global offset table. All symbol suffixes start
with the character
:
(omitted in the list below). Every symbol use in code or a read only section must
therefore have a PIC suffix to enable a useful shared library to be created. Usually, these constructs
must not be used with an additive constant offset as is usually allowed, i.e. no 4 as in
symbol + 4
is
allowed. This restriction is checked at link time, not at assembly time.
GOT
Attaching this suffix to a symbol in an instruction causes the symbol to be entered into
the global offset table. The value is a 32 bit index for that symbol into the global offset
table. The name of the corresponding relocation is
R_CRIS_32_GOT
. Example:
move.d
[$r0+extsym:GOT],$r9
GOT16
Same as for
GOT
, but the value is a 16 bit index into the global offset table. The corresponding
relocation is
R_CRIS_16_GOT
. Example:
move.d [$r0+asymbol:GOT16],$r10
PLT
This suffix is used for function symbols. It causes a procedure linkage table, an array of code
stubs, to be created at the time the shared object is created or linked against, together with a
global offset table entry. The value is a pc relative offset to the corresponding stub code in the
procedure linkage table. This arrangement causes the run time symbol resolver to be called to
look up and set the value of the symbol the first time the function is called (at latest; depending
environment variables). It is only safe to leave the symbol unresolved this way if all references
are function calls. The name of the relocation is
R_CRIS_32_PLT_PCREL
. Example:
add.d
fnname:PLT,$pc
PLTG
Like PLT, but the value is relative to the beginning of the global offset table. The relocation is
R_CRIS_32_PLT_GOTREL
. Example:
move.d fnname:PLTG,$r3
GOTPLT
Similar to
PLT
, but the value of the symbol is a 32 bit index into the global offset table. This
is somewhat of a mix between the effect of the
GOT
and the
PLT
suffix; the difference to
GOT
is that there will be a procedure linkage table entry created, and that the symbol is assumed to






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

canadian web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved