This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: libtool linking libgcj
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: David Daney <ddaney at avtrex dot com>
- Cc: Bryce McKinlay <bryce at mckinlay dot net dot nz>, Andrew Haley <aph at redhat dot com>, java at gcc dot gnu dot org
- Date: 05 Oct 2003 07:26:20 -0300
- Subject: Re: libtool linking libgcj
- Organization: GCC Team, Red Hat
- References: <D6D0AD4A-F2D2-11D7-9328-003065F97F7C@mckinlay.net.nz><3F78BF95.7000601@avtrex.com>
On Sep 29, 2003, David Daney <ddaney@avtrex.com> wrote:
> The linker does not know where each method begins and ends, so it must
> assume that the entire object file is one method and use only one GOT
> for that object file.
Actually, it's not because it doesn't know where functions end. It
does, if .size directives are present. The thing is that local
optimizations in an object file might take advantage of the assumption
that the GOT pointer is the same. E.g., functions local to an object
file, whose address is never taken and potentially made visible to
other modules, could be optimized this way.
Also, consider GP-relative relocations in data sections. Which GP
value would you use for them? I remember having pondered about such
issues while introducing multi-got for mips, and the conclusion was
that you pretty much had to do it on a per-module basis.
--
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