optimized static library segfaults

Rich DAddio rich_daddio at yahoo.com
Thu Jun 21 22:42:16 UTC 2007


Hi,
  We saw a problem like this in one of our PPC buildroot chains a some months back. Do you know what version of uClibc you are using? I seem to vaguely recall that we either upgraded our uClibc or used a compatability option to get around it. 
   
  If no one else has a better answer I will dig thru my old notes and see if I can figure out what happened. BTW we never tried the optimization variation we always used -O2 and of course got the segfault on static.
   
  Rich d

Robert Connolly <robert at linuxfromscratch.org> wrote:
  Hello. Before making a bug report I want to check if any of you are familiar 
with this... If I build uClibc with -O1, -O2, or -Os, and then statically 
link a program to the new uClibc, the program will segfault. Dynamically 
linked programs run fine, and if I build uClibc with -O0 both static and 
dynamically linked programs are fine.

The options I config uClibc with doesn't seem to make a difference. I'm using 
gcc-4.1.2 and binutils-2.17. This is my backtrace of "main(){}" statically 
linked to a uClibc I built with "-Os -g3":

(gdb) bt
#0 0x00000000 in ?? ()
#1 0x080482dc in *__GI___uClibc_init () at 
libc/misc/internals/__uClibc_main.c:236
#2 0x0804836f in __uClibc_main (main=0x80481a8 , argc=1, 
argv=0xbfcf02d4,
app_init=0x80480b4 <_init>, app_fini=0x8048e04 <_fini>, rtld_fini=0, 
stack_end=0xbfcf02cc)
at libc/misc/internals/__uClibc_main.c:321
#3 0x080480f1 in _start () at libc/sysdeps/linux/i386/crt1.S:128

I'm guessing this is a GCC bug, but I'm not sure. I tried using a GCC patch to 
fix ffast-math/sse bug in gcc41, which didn't help. My arch is i686.

Are any of you familiar with this bug?

robert
_______________________________________________
uClibc mailing list
uClibc at uclibc.org
http://busybox.net/cgi-bin/mailman/listinfo/uclibc

 
---------------------------------
It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/uclibc/attachments/20070621/0926c3cc/attachment-0002.htm 


More information about the uClibc mailing list