optimized static library segfaults
Joakim Tjernlund
joakim.tjernlund at transmode.se
Sat Jun 23 15:41:31 UTC 2007
> -----Original Message-----
> From: uclibc-bounces at uclibc.org
> [mailto:uclibc-bounces at uclibc.org] On Behalf Of Robert Connolly
> Sent: den 21 juni 2007 22:48
> To: uclibc at uclibc.org
> Subject: optimized static library segfaults
>
> 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?
I bet this is a gcc bug OR binutils bug
Jocke
More information about the uClibc
mailing list