This is the mail archive of the gcc-patches@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: Fix libgcc symbols for sh4


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


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