This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: [linux-sh:02781] Re: Where does __sdivsi3_i4 come from?


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.

Stuart


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.
> 

Attachment: pgp00000.pgp
Description: PGP signature


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