Re: -fPIC

From: Kurt Roeckx <kurt(at)roeckx(dot)be>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Stark <gsstark(at)mit(dot)edu>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: -fPIC
Date: 2005-09-12 17:28:46
Message-ID: 20050912172846.GA29970@roeckx.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

  • Re: -fPIC at 2005-09-12 07:06:03 from Martijn van Oosterhout

Browse pgsql-hackers by date

  From Date Subject
Next Message Dann Corbit 2005-09-12 18:00:27 Re: Materialized Views in PostgreSQL
Previous Message Josh Berkus 2005-09-12 16:23:49 Re: Materialized Views in PostgreSQL