Re: -fPIC - Mailing list pgsql-hackers

From Kurt Roeckx
Subject Re: -fPIC
Date
Msg-id 20050912172846.GA29970@roeckx.be
Whole thread Raw
In response to Re: -fPIC  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
On Mon, Sep 12, 2005 at 09:06:03AM +0200, Martijn van Oosterhout wrote:
> 
> The new gcc visibility stuff gives you way of shrinking the symbol
> table and improving performance.

And you really should start with making use of static, which has
about the same effect, except that the visibility stuff works
accross compile units.

> You can shrink the symbol table with --version-script in LD, you
> provide a script like:
> 
>  {
>   global:
>     pg_finfo_*
>     <other exported symbols>
>   local: *
>  }

And if you use the visibility stuff properly, it should end up
with only exporting the same symbols you put in the version
script.  However, the version script is good other things too.

Those are all things you should consider doing, but only one of
them is really portable, and that is making use of static where
you can.

> Whether it's enough... For people who want to know the gory details,
> read this (by Ulrich Drepper).
> 
> http://people.redhat.com/drepper/dsohowto.pdf

And it's good reading, everybody making a shared object really
should read this.


Kurt



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Materialized Views in PostgreSQL
Next
From: "Dann Corbit"
Date:
Subject: Re: Materialized Views in PostgreSQL