[uClibc]0.9.19 mipsel FP or loader issue?

Jon Loeliger jdl at vivato.net
Wed May 14 18:46:06 MDT 2003


Hi uClibc folks,

I've come to plead my case for some mipsel help head-banging
here starts causing real damage.  I've spent the last day or two
reading uClibc cvs checkin reports and mail archives since the
beginning of the year.  Oook.  I mean, I know why sjhill (Hi!)
owes us all donuts... :-)

So, I've got a cross compiled (i386->mipsel) GCC 3.2.2 uClibc
environtment.  I've tried uClibc release 0.9.15, 0.9.19, and
the current top of CVS tree as of an hour ago.  They all appear
to give me the same bad results.  Bummer.

I originally thought I had a floating point issue, but now I'm
not sure.  It could be a dynamic loader problem.  Back in February
Erik made some changes to fix some issues with the mips dynamic
loader.  I think I may still be seeing these problems.  Not sure.

I think I have a linux 2.4.18 based on the IDT release with the
Algorithmics FPU emulator 1.5 built into it.  My uClibc .config
file follows.

I believe that things are basically sane.  I can compile the
kernel, a root FS full of busybox 60.5, utilities, kernel modules
and some regular user-land programs and they all seem to work
fine right up until a floating point operation is performed.
Then it takes a segmentation fault.  Note, not a SIGILL or a
floating point exception.

My test program has been this trivial program:

    float a = 1.0, b = 5.0;

    printf("Hello\n");
    f = a / b;
    printf("f is now %g\n", f);

I do see the "Hello\n" output, but then it takes a segmentation fault.
The assembly for this program contains actual floating point 
instructions and registers.  I am expecting to have them trapped
into the kernel and emulated, but my hunch is that it never really
gets that far.  Totally guessing here.

Do we know if the FP linkage between the kernel/Algorithmics code
and the uClibc 0.9.19 libraries is consistent?

I turned LD_DEBUG on and watched hundreds of lines of BEFORE/AFTER
messages, and ultimately saw no difference in output or smoking gun.

Depending on -msoft-float or -static compiling, I can also make
this program produce "f is now nan" output and not pull a SEGV.

Ringing a bell for anyone?  Anyone?  Beuller?

Thanks,
jdl

-----------------------------------------------------

#
# Automatically generated make config: don't edit
#

#
# Target Architecture Features and Options
#
HAVE_ELF=y
UCLIBC_HAS_MMU=y
UCLIBC_HAS_FLOATS=y
HAS_FPU=y
DO_C99_MATH=y
WARNINGS="-Wall"
KERNEL_SOURCE="/localstore0/jdl/vbs/build_mipsel/linux"
C_SYMBOL_PREFIX=""
HAVE_DOT_CONFIG=y

#
# General Library Settings
#
DOPIC=y
HAVE_SHARED=y
# ADD_LIBGCC_FUNCTIONS is not set
BUILD_UCLIBC_LDSO=y
LDSO_LDD_SUPPORT=y
UCLIBC_CTOR_DTOR=y
UCLIBC_HAS_THREADS=y
# UCLIBC_HAS_LFS is not set
# MALLOC is not set
MALLOC_930716=y
UCLIBC_DYNAMIC_ATEXIT=y
HAS_SHADOW=y
UCLIBC_HAS_REGEX=y
UNIX98PTY_ONLY=y
ASSUME_DEVPTS=y

#
# Networking Support
#
# UCLIBC_HAS_IPV6 is not set
UCLIBC_HAS_RPC=y
# UCLIBC_HAS_FULL_RPC is not set

#
# String and Stdio Support
#
UCLIBC_HAS_WCHAR=y
# UCLIBC_HAS_LOCALE is not set
# USE_OLD_VFPRINTF is not set

#
# Library Installation Options
#
SHARED_LIB_LOADER_PATH="/lib"
DEVEL_PREFIX="/localstore0/jdl/vbs/build_mipsel/staging_dir"
SYSTEM_DEVEL_PREFIX="/localstore0/jdl/vbs/build_mipsel/staging_dir"
DEVEL_TOOL_PREFIX="/localstore0/jdl/vbs/build_mipsel/staging_dir/usr"

#
# uClibc hacking options
#
# DODEBUG is not set
DOASSERTS=y
# SUPPORT_LD_DEBUG is not set
# SUPPORT_LD_DEBUG_EARLY is not set


More information about the uClibc mailing list