public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* Linux: FPU control word not set when __fpu_control == _dl_fpu_control.
@ 2000-03-09 10:12 Scott Bambrough
  2000-03-09 10:44 ` Andreas Jaeger
  0 siblings, 1 reply; 5+ messages in thread
From: Scott Bambrough @ 2000-03-09 10:12 UTC (permalink / raw)
  To: libc-hacker mailing list

Hi guys,

I've built a versioned glibc 2.1.3 on a NetWinder, and a kernel with a debug
printk on WFS (the instruction called when __setfpucw is called).  If I build
static and dynamic test executables (I was using fp-cmp-1.c from the gcc
testsuite), I only get a printk from WFS when the static executable is run.

If I look at sysdeps/unix/sysv/linux/init-first.c, around line 70, there is a
call to __setfpucw that should be executed.  If I look at the the generated .o
and .os files it is easy to see why it is failing.  It doesn't work when
dynamically linked because of the if statement included when compiling with PIC
enabled.

As far as I can tell __fpu_control is almost always equal to _dl_fpu_control. 
__fpu_control is defined and statically initialized in
sysdeps/generic/fpu_control.c.  It is initialized with _FPU_DEFAULT. 
_dl_fpu_control is defined in elf/rtld.c, and statically initialized with
_FPU_DEFAULT.  It is also dynamically initialized from _dl_sysdep_start in
sysdeps/generic/dl-sysdep.c.  The initialization is done if the flag AT_FPUCW is
in the the headers in the executable.  The value used is taken from the
executable as well.

This doesn't seem to be an ARM specific problem, but a Linux specific one.  Does
anyone else see the same thing on other platforms?

Scott


-- 
Scott Bambrough - Software Engineer
REBEL.COM    http://www.rebel.com
NetWinder    http://www.netwinder.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-03-09 13:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-09 10:12 Linux: FPU control word not set when __fpu_control == _dl_fpu_control Scott Bambrough
2000-03-09 10:44 ` Andreas Jaeger
2000-03-09 12:36   ` Scott Bambrough
2000-03-09 12:47     ` Jakub Jelinek
2000-03-09 13:15       ` Scott Bambrough

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).