[SH][PATCH] __fpscr_values broken

Daniel Jacobowitz drow@false.org
Sun Feb 1 03:33:00 GMT 2009


On Sat, Jan 31, 2009 at 11:23:54AM +0900, Kaz Kojima wrote:
> No, it was broken before glibc-2.3.2 era.  Before that era,
> every shared libraries may have their own local __fpscr_values
> given by libgcc.  It's wrong because __fpscr_values should be
> the unique object in the executable image.  We put __fpscr_values
> in the crt object to avoid the issue.  Unfortunately it causes
> the link time error with z-defs option when building libc/libm.
> Pragmatically, putting it in libc.so is not problem because
> almost all programs would link with libc.  Though we decided
> not to do so and it'd be too late to change it.

I tried to work out why it had to be unique in the executable.
There's __set_fpscr, but it is only called by crt1.asm used for newlib
targets.  Is it only to support fpu_control.h:_FPU_SETCW?

If it does have to be unique, I don't think Andrew's patch will
work :-(  But I don't understand how it works today, in that
case.  ld.so exports __fpscr_values@@GLIBC_PRIVATE, which libc
will presumably see at runtime.  Another copy is in start.S and ends
up in each application.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Libc-alpha mailing list