On Saturday 23 June 2007 07:12:39 Stefan Weil wrote:
> Rob Landley schrieb:
> > Ok, it's a more fundamental problem:
> > [EMAIL PROTECTED]:/sys$ qemu-i386
> > Segmentation fault (core dumped)
> > Nothing to do with the program it's trying to run, it segfaults with no
> > arguments.
> > Is anybody else seeing this?
> > Rob
> Yes, I see this on Debian Linux since several months (libc update?).
Ubuntu 7.04 is using glibc-2.5.
> The crash is caused by libc startup code which calls a null pointer.
> QEMU provides this null pointer with the __init_array_start
> workaround in linux-user/main.c.
What exactly is this working around, anyway? There are comments in the code
that it's doing something fancy (being both a shared library and an
executable, I think) but I'm not sure why...
> This can be fixed with some kind of code hack - see my patch
> (which is not really a solution, but one more workaround).
I applied your patch and still got the segfault.
> Nevertheless user mode emulations remains unusable even
> with this patch because of TLS problems.
That I know how to work around. Set the environment variable
LD_ASSUME_KERNEL=2.4.1 and glibc won't try to use TLS.
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson.