[Top] [All Lists]

Re: regarding jal instruction in mips

To: aditya <>
Subject: Re: regarding jal instruction in mips
From: Dominic Sweetman <>
Date: Mon, 17 Jun 2002 12:17:03 +0100 (BST)
In-reply-to: <>
References: <>
aditya ( writes:

> I have a doubt w.r.t. Linux on mips.
> in mips there is a instruction jal which jumps across 256 MB
> boundry.  but this is a restriction as shared text (libraries) and
> private text (program's text) should be located within 256 MB
> boundry. Is it true ??

In the usual Linux address map it isn't true: library code might
easily fail to be in the same 256Mbyte 'chunk' of virtual memory.

Linux/MIPS applications implement calls between modules (and for
relocatable libraries, calls inside modules too) with an indirection
through a table of pointers - the "global access table" or GOT.

We normally think of this as a way of providing suitably
position-independent code...  There's a fair description of this in my
book "See MIPS Run" under the heading "Sharing Library Code in the
MIPS ABI" - Chapter 10 or so.

Dominic Sweetman, 
Algorithmics Ltd
The Fruit Farm, Ely Road, Chittering, CAMBS CB5 9PH, ENGLAND
phone: +44 1223 706200 / fax: +44 1223 706250 / direct: +44 1223 706205

<Prev in Thread] Current Thread [Next in Thread>