Re: -fPIC

Поиск
Список
Период
Сортировка
Искать
От
Martijn van Oosterhout
Тема
Re: -fPIC
Дата
Msg-id
20050912070558.GA3114@svana.org
Ответ на
Re: -fPIC (Tom Lane)
Список
Дерево обсуждения
-fPIC Peter Eisentraut <peter_e@gmx.net>
Re: -fPIC Kurt Roeckx <kurt@roeckx.be>
Re: -fPIC Tom Lane <tgl@sss.pgh.pa.us>
Re: -fPIC Peter Eisentraut <peter_e@gmx.net>
Re: -fPIC Stephen Frost <sfrost@snowman.net>
Re: -fPIC Greg Stark <gsstark@mit.edu>
Re: -fPIC Tom Lane <tgl@sss.pgh.pa.us>
Re: -fPIC Martijn van Oosterhout <kleptog@svana.org>
Re: -fPIC Kurt Roeckx <kurt@roeckx.be>
On Sun, Sep 11, 2005 at 10:32:51PM -0400, Tom Lane wrote:
> Greg Stark  writes:
> > ... mixing -fpic and -fPIC libraries is a problem.
> 
> Is it?  I would think having two options would be essentially unworkable
> if so.

The thing is, on i386 it makes no difference, it's only on some
archtechtures where it matters. And it has to do with both the size of
the symbol table and the size of the code.

Given that you don't know what you need to use until you compile it, if
people are compiling all their stuff with -fPIC you can at least be
sure that it won't break on other architectures.

The new gcc visibility stuff gives you way of shrinking the symbol
table and improving performance. There is a performance difference
between -fpic and -fPIC, whether it's big enough to care about...

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

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

-- 
Martijn van Oosterhout      http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.
В списке pgsql-hackers по дате отправления
От: Mark Kirkwood
Дата:
От: Jean-Michel Pouré
Дата:
FAQ