From: David Daney <ddaney@avtrex.com>
To: Philippe De Swert <philippedeswert@scarlet.be>
Cc: linux-mips <linux-mips@linux-mips.org>
Subject: Re: unresolved (soft)float symbols
Date: Thu, 13 Jan 2005 09:17:09 -0800 [thread overview]
Message-ID: <41E6AD15.7030104@avtrex.com> (raw)
In-Reply-To: <IA9DY0$DCC07516FD959EE0729448D36856A324@scarlet.be>
Philippe De Swert wrote:
> Hello people,
>
> I have a custom build module with some float operations in it. I build a
> 2.4.17 kernel for a mips32 core (BCM6348 chip). It boots up fine, busybox
> works nicely, also some other apps like dropbear and thttpd do what they are
> expected to do.
>
> I build everything with soft-floats using a uclibc toolchain (kernel +
> filesystem). This is the configuration of my toolchain.
>
> ~#mips-linux-gcc -v
> Reading specs from
> /vobs/linux/tools/3pp-build/gcc/../../mips/gcc/lib/gcc-lib/mips-linux-uclibc/3.3.4/specs
> Configured with:
> /vobs/linux/tools/3pp-build/gcc/toolchain_build_mips_nofpu/gcc-3.3.4/configure
> --prefix=/vobs/linux/tools/3pp-build/gcc/../../mips/gcc
> --build=i386-pc-linux-gnu --host=i386-pc-linux-gnu --target=mips-linux-uclibc
> --enable-languages=c,c++ --enable-shared --disable-__cxa_atexit
> --enable-target-optspace --with-gnu-ld --disable-nls --enable-multilib
> --without-float --enable-sjlj-exceptions
> Thread model: posix
> gcc driver version 3.3.4 executing gcc version 3.3.3
>
> The module builds fine also, but when insmodding I get the following error.
>
> insmod: unresolved symbol __fixdfsi
> insmod: unresolved symbol __floatsidf
> insmod: unresolved symbol __muldf3
> insmod: unresolved symbol __adddf3
>
> As these are all float operations I am wondering about the following things:
>
> 1.why they are in there? I have a soft-float toolchain....
> 2.Is there float support in the kernel? While googling for it I found a few
> things talking about FP point in the kernel. Does it have something to do with
> the Algorithmics/MIPS FPU emulator. (Although it does not work emulator or
> not. Which I expected because it should only be used by apps which emit FPU
> calls, and this should not happen because I use a softfloat toolchain). So I
> expect it does not really have something to do with this.
> 3.I took care of using the same compiler options as the kernel compilation
> uses. I guess this is the correct way, and the problems are thus not related
> to this.
>
> Any pointers to a solution would be helpful. I am trying woth a hard-float
> toolchain now (it only takes a while to compile everything). I could also not
> dig up anything similar in the archives.
>
These symbols are defined in libgcc.a, however libgcc.a is normally
compiled with options that make it incompatible with kernel modules.
There is a trick I have played to work around this. If you do a normal gcc
build and then remove gcc/libgcc.a and the gcc/libgcc directory. You can
build a kernel compatible version by doing:
export LIBGCC2_DEBUG_CFLAGS='-g -G0 -mno-abicalls -fno-pic'
make
The resulting libgcc.a will be compatible with the kernel. Rename it to
something like libgcckernel.a.
Now you can link the kernel module adding -lgcckernel and you should be
ready to go.
David Daney.
next prev parent reply other threads:[~2005-01-13 17:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-13 14:08 unresolved (soft)float symbols Philippe De Swert
2005-01-13 14:13 ` sjhill
2005-01-13 15:16 ` Ralf Baechle
2005-01-13 17:17 ` David Daney [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-01-14 9:34 Philippe De Swert
2005-01-14 9:45 Philippe De Swert
2005-01-14 9:45 ` Philippe De Swert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41E6AD15.7030104@avtrex.com \
--to=ddaney@avtrex.com \
--cc=linux-mips@linux-mips.org \
--cc=philippedeswert@scarlet.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.