optimized static library segfaults
Robert Connolly
robert at linuxfromscratch.org
Thu Jun 21 20:47:37 UTC 2007
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 <main>, 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20070621/0cf86a1e/attachment-0002.pgp
More information about the uClibc
mailing list