Dear John Rigby,

In message <aanlktin+nyvqr6hndot82wzwswm+4tw+h+py5rt1x...@mail.gmail.com> you 
wrote:
>
> The part that does not work is that some veneer routines do not get fixed up.

These veneer routines seem to be specific to some (pretty recent?)
tool chain versions. We haven't seen any of these with older tool
chains (say, up to and including gcc 4.2.x).

Can anybody shed some light on 1) when these routines have been
introduced and 2) what their exact function is?

Is the specific tool chain in question available somewhere for
testing?

> When u-boot copies itself to ram it relocates the jump tables it knows
> about and could relocate the addresses in the veneer routines if it
> knew about them.

The relocation performed by U-Boot is based on the fact that we
compile the code with -fPIC and then rely on entries in the GOT to
apply the relocation offset to the addresses registered there.

It seems these veneer routines have not been entered into the GOT.

Note: it would be helpfup if somebody could verify this.

If so, the question is if there is a problem with handling -fPIC code?

> There are at least three possible ways to fix these:
> 
> 1) u-boot has its own private libgcc and if I use it the problem goes away.

In U-Boot we consider this always as a last resort workaround for
broken tool chains. We prefer to see the problems fixed at the cause -
either in U-Boot or in the tool chain, wherever the problem may be.

> 2) is there an option for the toolchain to use an arm libgcc instead of thumb?

I cannot comment on that. I don't even know which tool chain was used,
or which versions of gcc and binutils.

> 3) is there a way to find the veneers at runtime and fix them up?

The problem should go away automatically when the addresses of these
routines somehow make their way into the GOT.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
The price one pays for pursuing any profession,  or  calling,  is  an
intimate knowledge of its ugly side.                  - James Baldwin

_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-toolchain

Reply via email to