This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
__sim_exceptions undefined when linking glibc-2.3.2's libm.so with--without-fp
- From: Dan Kegel <dank at kegel dot com>
- To: GNU C Library <libc-alpha at sources dot redhat dot com>
- Date: Tue, 29 Jul 2003 14:53:33 -0700
- Subject: __sim_exceptions undefined when linking glibc-2.3.2's libm.so with--without-fp
On ppc405, I'm getting the following when linking glibc's libm:
/gcc-3.3-glibc-2.3.2/build-glibc/math/libm_pic.a(fclrexcpt.os)(.text+0x1a): In function `feclearexcept@GLIBC_2.1':
: undefined reference to `__sim_exceptions'
That symbol seems to be present in libc.so. nm shows
$ find . -name '*.o' -or -name '*.so' -or -name '*.so'|
./build-glibc/math/fclrexcpt.o: U __sim_exceptions
...
./build-glibc/math/fclrexcpt.os: U __sim_exceptions
...
./build-glibc/soft-fp/sim-full.o:00000004 C __sim_exceptions
./build-glibc/soft-fp/sim-full.os:00000004 C __sim_exceptions
./build-glibc/libc_pic.os:0000215c B __sim_exceptions
./build-glibc/libc.so:0014de84 b __sim_exceptions
The link command that's failing is, more or less,
powerpc-405-linux-gnu-gcc -shared -static-libgcc -Wl,-O1 -msoft-float -Wl,-z,defs -Wl,-dynamic-linker=/lib/ld.so.1 -B$build/csu/ -Wl,--version-script=$build/libm.map -Wl,-soname=libm.so.6 -Wl,-z,combreloc -L$build -L$build/math
-L$build/elf -L$build/dlfcn -L$build/nss -L$build/nis -L$build/rt -L$build/resolv -L$build/crypt -L$build/linuxthreads
-Wl,-rpath-link=$build:$build/math:$build/elf:$build/dlfcn:$build/nss:$build/nis:$build/rt:$build/resolv:$build/crypt:$build/linuxthreads -o $build/math/libm.so -T $build/math/libm.so.lds $build/csu/abi-note.o -Wl,--whole-archive
$build/math/libm_pic.a -Wl,--no-whole-archive $build/elf/interp.os $build/libc.so $build/libc_nonshared.a
I'm a total newbie at versioned symbols and the like.
The references in libm_pic.a should have been found in libc.so,
shouldn't they have?
Hmm, __sim_exceptions was declared in sysdeps/powerpc/nofpu/soft-supp.h
with 'attribute_hidden', but removing that didn't help;
nm shows it's still local.
Could it be that some Versions file needs to be changed, kind of like in
http://sources.redhat.com/ml/libc-alpha/2003-06/msg00027.html ?
I get the feeling this might be a last unfinished little corner of
Roland McGrath's nofpu patch,
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/powerpc/nofpu/soft-supp.h?rev=1.1&content-type=text/x-cvsweb-markup&cvsroot=glibc
Thanks,
Dan
p.s. I posted on bug-glibc about this a couple days ago,
http://sources.redhat.com/ml/bug-glibc/2003-07/msg00119.html,
but haven't progressed much since then.
--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045