Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Aug 1997 11:30:25 +0930
From:      Greg Lehey <grog@lemis.com>
To:        Eivind Eklund <perhaps@yes.no>
Cc:        Marty Leisner <leisner@sdsp.mc.xerox.com>, louie@transsys.com, imp@rover.village.org, dave@jetcafe.org, sef@Kithrup.COM, hackers@FreeBSD.ORG
Subject:   PIC (was: shared libraries?)
Message-ID:  <19970830113025.45435@lemis.com>
In-Reply-To: <199708291734.TAA01553@bitbox.follo.net>; from Eivind Eklund on Fri, Aug 29, 1997 at 07:34:17PM %2B0200
References:  <199708290035.UAA17627@whizzo.TransSys.COM> <9708291449.AA17699@gnu.sdsp.mc.xerox.com> <199708291734.TAA01553@bitbox.follo.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 29, 1997 at 07:34:17PM +0200, Eivind Eklund wrote:
>>
>>
>> Can someone point me to a reference (or explain it briefly) how PIC
>> works?
>
> Basically just by doing all memory references relative to a register,
> which usually initially was set up relative to the PC (program
> counter, AKA instruction pointer).  Thus, you can load it on any
> address in your computer, and it will work just like it was supposed
> to.

Probably the most important factor in PIC is the instruction set.
Many systems generate PIC by default, or with few constraints.  The
i386 architecture doesn't, unfortunately, and to generate PIC you have
to do without a number of instructions or address modes.  As a result,
the code is less efficient.

Greg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970830113025.45435>