This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix libgcc symbols for sh4
- From: kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: dank at kegel dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 21 Aug 2003 23:42:29 +0900
- Subject: Re: Fix libgcc symbols for sh4
- References: <3F44D14E.3030206@kegel.com>
Dan Kegel <dank@kegel.com> wrote:
> 'make check' in gcc-3.4-20030813 on sh4 failed for me while linking
> libstdc++-v3/testsuite/abi_check.c. with error
> sh4-unknown-linux-gnu/bin/ld: abi_check: hidden symbol `__sdivsi3_i4' in
> build-gcc/gcc/libgcc.a(_sdivsi3_i4.oS) is referenced by DSO
> without the following patch from Daniel Jacobowitz
> (see also http://www.kegel.com/crosstool/current/gcc-3.4-20030813-patches/gcc-3.4-20030813-dj0815.patch ):
With this patch, libgcc_s.so exports __sdivsi3_i4, doesn't it?
__sdivsi3_i4 is a special library function and gcc generates
the code which assumes that __sdivsi3_i4 never clobbers r0 register.
But if libgcc_s.so exports __sdivsi3_i4, it can be called via PLT
which clobbers r0 in SH case. It will break the above assumption. See
<URL:http://www.geocrawler.com/mail/msg.php3?msg_id=6767865&list=3076>
for example.
Regards,
kaz