This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libtool linking libgcj


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]