[linux-sh:02781] Re: Where does __sdivsi3_i4 come from?

Stuart Menefy stuart.menefy@st.com
Tue Jun 10 16:25:00 GMT 2003

You need to build kernel modules with the -mno-implicit-fp compiler
option. This is the same option used when building the kernel, and
prevents the compiler making use of the floating point unit for integer
divides. It also effects which intrinsic functions the compiler uses
for integer divide, which is what you are seeing here.


On Tue, 10 Jun 2003 16:17:06 +0100 kernel-hacker@bennee.com wrote:

> On Tue, 2003-06-10 at 16:12, Vincent Rubiolo wrote:
> > Hi,
> > 
> > Did you check that you are correctly linking against libgcc? IIRC, these symbs are used by libgcc to 
> > emulate math hardware instructions (yours should be about division, obviously) if they are not found 
> > on a certain architecture.
> Well kernel modules don't explicitly link to libgcc, they can only use
> symbols exported by the kernel. In my case the kernel exports __sdivsi3
> but the module compile generated  __sdivsi3_i4 which obviously fails to
> link.
> Also adding to the confusion is why the compiler feels the need to do a
> division for a *particular* function call where other calls to the
> *same* function do not cause this code to be generated. 
> > Hopes that helps,
> A bit thanks. Now at least I know what it is, but not why its trying to
> do it.
> -- 
> Alex, homepage: http://www.bennee.com/~alex/
> When all else fails, read the instructions.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 185 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20030610/e5698538/attachment.sig>

More information about the crossgcc mailing list