Subject: Re: gcc3 "millicode" problems with sh3 (toolchain/22452)
To: David Laight <>
From: Marcus Comstedt <>
List: tech-toolchain
Date: 09/03/2003 17:27:10
David Laight <> writes:

> I thought the PLT (once fixed up) just contained a jump to the real function.
> One register should be more than enough - but may require more code and
> some nasty tricks.

You need to load the address of the real function into a register so
that you can jump to it.  A relative jump will not work since the real
function may be more than 2K away.  Also, if the calling code is PIC,
it will need to compute the correct location of the PLT first, which
takes two registers I think (one to hold the address of a position in
the code, and one to load with the offset to add to that position to
get the address in the PLT).

  // Marcus