This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: RFC: Handling of libgcc symbols in SH shared libraries


On Aug  2, 2004, Joern Rennecke <joern.rennecke@superh.com> wrote:

> For now, for SFUNC_GOT, I always make function_symbol generate
> @GOT addressing, although for most functions that is not strictly
> necessary: they could use @PLT addressing, as long as it is guaranteed
> that the symbol is resolved at load time (or earlier with pre-linking).

But why would you want @PLT addressing instead of @GOT addressing?  It
would have a performance impact, since the @PLT code would just do the
load from GOT and jump to the loaded address (with a possible pipeline
stall on the memory load), whereas if you load the address from the
GOT and call it directly you can schedule better.  Sure, it's one
additional instruction per call, so it may have negative code size and
thus cache effects.  How badly would you like to get rid of it?

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}


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