Subject: Re: Switching lib/csu/c++/c++rt0.c to -fPIC
To: Paul Kranenburg , Simon Burge <>
From: Ignatios Souvatzis <>
List: tech-userlevel
Date: 12/14/1999 15:18:06
On Tue, Dec 14, 1999 at 03:13:58PM +0100, Paul Kranenburg wrote:
> > Is performance such an issue if it's just c++rt0.o that's compiled with
> > -fPIC?  There's not that much that's done in there, and it only happens
> > at program start-up and shut-down.  If I'm not missing something I'd say
> > b) is a sure winner here...
> > 
> This does not affect start-up time.  But it does cost at run-time:
> one extra instruction for each reference to some global data item.
> A simple benchmark test shows that the overhead is measurable:
> about 5% for a load-global-data bound pic module. (measured on
> a 50Mhz Sparcstation 5).

What happens if _one_ library my program needs is so bit that it needs -fPIC...
do I need to build all libraries.

 * Progress (n.): The process through which Usenet has evolved from
   smart people in front of dumb terminals to dumb people in front of
   smart terminals.  -- (obscurity)