This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Code Optimization
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Taha Mannan Jiruwala <taha at sasken dot com>
- Cc: Ben Elliston <bje at redhat dot com>, gcc at gnu dot org
- Date: 07 Oct 2002 16:28:28 -0300
- Subject: Re: Code Optimization
- Organization: GCC Team, Red Hat
- References: <3DA10EED.8EBF831A@sasken.com><o7elb2zrrk.fsf@tooth.toronto.redhat.com><3DA1309E.109330E3@sasken.com>
On Oct 7, 2002, Taha Mannan Jiruwala <taha@sasken.com> wrote:
> I think I have not put my problem statement clearly
In fact, you haven't even mentioned which architecture you're
targeting. This can make a lot of difference as to the set of options
available.
> - Find a shared library solution that is efficient (Does not drastically
> reduce performance, may be something Intermediate to shared and static
> approach)
You may try to create dynamic libraries out of non-PIC. Assuming this
is an IA32 architecture (in which -fPIC makes a lot of difference
given how register-starved it is), it can help speed up the
application code, at the expense of a lot of additional run-time
relocations, that will impact library load time.
Unfortunately, if you care about portability across multiple targets,
then creating dynamic libraries out of non-PIC is not an option.
You may consider using symbols of hidden visibility within the shared
library, such that function calls don't have to go through a PLT.
This may save space (for relocations), time (for relocations and
function calls).
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer