Subject: Re: gcc3 "millicode" problems with sh3 (toolchain/22452)
To: None <firstname.lastname@example.org, email@example.com,>
From: David Laight <firstname.lastname@example.org>
Date: 09/03/2003 13:34:04
> To solve this problem we need a static library with PIC code for all
> such functions, marked as ".hidden", we then need to link all shared
> libraries against this millicode library so that all each shared
> library gets its own private __udivsi3 &c that it can call directly.
> We also need a copy of __udivsi3 &c in libgcc.a.
Why does that help? Or is it some special feature of .hidden?
Usually references to non-static functions in shared libraries are
always called via PLT - because the version (if any) in the user
program should be used in preference to the one in the library.
(IIRC it is worth compiling all of a shared library as a single
compilation unit, and with only the external interfaces non-static.
Even making internal calls to interface functions use a different
(static) symbol to ensure the correct routine is called.)
Actually, it ought (surely) be possible to write PLT code that
can jump to the correct function without requiring any extra registers?
(or is the sh object code particularly brain-dead?)
David Laight: email@example.com