Re: glibc on kfreebsd-amd64 (was: Re: segfaults on amd64, one more update)

2006-02-28 Thread Petr Salinger
> I'm not well-versed on this, so I'd say that you do as you see more fit (as > long > as you don't need to change kernel ABI of course). We already have different startup, ABI is still only draft, and just committed interface (via %rdi, %rsi) is equal to standard C calling interface for "void

Re: glibc on kfreebsd-amd64 (was: Re: segfaults on amd64, one more update)

2006-02-28 Thread Robert Millan
On Tue, Feb 28, 2006 at 04:04:11PM +0100, Petr Salinger wrote: > Changes for 2nd variant are really small, could you please test them. Works fine. Thanks again, Petr. > > The definition of argument passing into _startup is in ABI > > since draft 0.94 (January 2005). > > > > %rsp - 16-byte align

Re: glibc on kfreebsd-amd64 (was: Re: segfaults on amd64, one more update)

2006-02-28 Thread Petr Salinger
Changes for 2nd variant are really small, could you please test them. Thanks Petr > The definition of argument passing into _startup is in ABI > since draft 0.94 (January 2005). > > %rsp - 16-byte aligned pointer to stack, on top of stack is argc > %rdx - destructor function or zero for

Re: glibc on kfreebsd-amd64 (was: Re: segfaults on amd64, one more update)

2006-02-28 Thread Petr Salinger
> > More complex programs like grep work fine, too. I'm running glibc testsuite > > now, and will run coreutils testsuite within a few minutes. > > Strange. It seems even though you fixed it for dynamicaly linked binaries, > static ones do still exhibit this problem (segfault in exit.c:60). > >

Re: glibc on kfreebsd-amd64 (was: Re: segfaults on amd64, one more update)

2006-02-28 Thread Robert Millan
On Sun, Feb 26, 2006 at 09:13:37PM +0100, Robert Millan wrote: > On Sun, Feb 26, 2006 at 07:59:21PM +0100, Petr Salinger wrote: > > Hello Robert, > > > > one more update, please could you test > > with sysdeps/x86_64/elf/start.S from previous mail > > and enclosed sysdeps/x86_64/dl-machine.h > >

Re: glibc on kfreebsd-amd64 (was: Re: segfaults on amd64, one more update)

2006-02-26 Thread Robert Millan
On Sun, Feb 26, 2006 at 09:13:37PM +0100, Robert Millan wrote: > > Works!! > > More complex programs like grep work fine, too. I'm running glibc testsuite > now, and will run coreutils testsuite within a few minutes. I have committed the list of testsuite failures in trunk/glibc-2.3-head/AMD64.

Re: glibc on kfreebsd-amd64 (was: Re: segfaults on amd64, one more update)

2006-02-26 Thread Guillem Jover
On Sun, Feb 26, 2006 at 09:13:37PM +0100, Robert Millan wrote: > On Sun, Feb 26, 2006 at 07:59:21PM +0100, Petr Salinger wrote: > > one more update, please could you test > > with sysdeps/x86_64/elf/start.S from previous mail > > and enclosed sysdeps/x86_64/dl-machine.h > > > > iff it works, I w

Re: segfaults on amd64

2006-02-26 Thread Robert Millan
On Sun, Feb 26, 2006 at 03:12:03PM +0100, Petr Salinger wrote: > Hello Robert, > > just guess, could you please test attached file instead of standard > sysdeps/x86_64/elf/start.S ? Segfault again, also dependant on argv[0] length. This time the backtrace is a bit different though, see attached

glibc on kfreebsd-amd64 (was: Re: segfaults on amd64, one more update)

2006-02-26 Thread Robert Millan
On Sun, Feb 26, 2006 at 07:59:21PM +0100, Petr Salinger wrote: > Hello Robert, > > one more update, please could you test > with sysdeps/x86_64/elf/start.S from previous mail > and enclosed sysdeps/x86_64/dl-machine.h > > iff it works, I will write something better, > but for test this should

Re: segfaults on amd64

2006-02-26 Thread Petr Salinger
Hello Robert, just guess, could you please test attached file instead of standard sysdeps/x86_64/elf/start.S ? Thanks Petr /* Startup code compliant to the ELF x86-64 ABI. Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Cont

Re: segfaults on amd64

2006-02-26 Thread Robert Millan
On Sat, Feb 25, 2006 at 09:08:33PM +0100, Petr Salinger wrote: > Robert, > > can you please also try > > LD_SHOW_AUXV=all /lib/ld-kfreebsd-x86-64.so.1 $ LD_SHOW_AUXV=all /lib/ld-kfreebsd-x86-64.so.1 AT_PHDR: 0x40 AT_PHENT:56 AT_PHNUM:6 AT_PAGESZ: 4096 AT_FLAGS:

Re: segfaults on amd64

2006-02-26 Thread Robert Millan
On Sat, Feb 25, 2006 at 08:12:03PM +0100, Petr Salinger wrote: > The bug is fixed only partially, it is still in kernel, > now it affect only DYN object, > EXEC are (on kfreebsd-i386) mapped correctly. > > Can you, please, test also following: > > > #inclu

Re: segfaults on amd64

2006-02-25 Thread Petr Salinger
> Uhm that might be explained by ld.so being allocated in 0x0. Sounds like a > repetition of #336496. Was this a problem in kernel, libc, binutils...? > > [EMAIL PROTECTED]:/tmp$ /lib/ld-kfreebsd-x86-64.so.1 --list /tmp//h > libc.so.0.1 => /gnu/lib/libc.so.0.1 (0x000800117000

Re: segfaults on amd64

2006-02-25 Thread Robert Millan
On Sat, Feb 25, 2006 at 04:45:04PM +0100, Robert Millan wrote: > Test example: > > [EMAIL PROTECTED]:/tmp$ ./test > argc = 1 > argv[0] = ./test > [EMAIL PROTECTED]:/tmp$ /tmp/test > Usage: ld.so [OPTION]... EXECUTABLE-FILE [ARGS-FOR-PROGRAM...] > You have invoked `ld.so', the helper program for sh

Re: segfaults on amd64

2006-02-25 Thread Robert Millan
On Sat, Feb 25, 2006 at 03:56:42PM +0100, Robert Millan wrote: > > Don't ask me why, but it seems that fixing the problem in binutils (see my > last > commit, binutils_elfosabi.diff) solved the segfaults. > > I got hello.c to work now. There, it came back. I think to summarise, the problem is:

Re: segfaults on amd64

2006-02-25 Thread Robert Millan
Don't ask me why, but it seems that fixing the problem in binutils (see my last commit, binutils_elfosabi.diff) solved the segfaults. I got hello.c to work now. -- Robert Millan -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Re: segfaults on amd64

2006-02-25 Thread Robert Millan
On Sat, Feb 25, 2006 at 09:39:19AM +0100, Petr Salinger wrote: > Hi! > > > I made a 64 bit glibc build and it seems to have some trouble: > > Please could you: > > - add headers/prototypes for printf, exit This revealed some breakage in my headers due to a mistake during manual install and pat

Re: segfaults on amd64

2006-02-25 Thread Petr Salinger
Hi! > I made a 64 bit glibc build and it seems to have some trouble: Please could you: - add headers/prototypes for printf, exit - try it under ktrace - try "make -k check" in glibc build Petr -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [

segfaults on amd64

2006-02-25 Thread Robert Millan
Hi! I made a 64 bit glibc build and it seems to have some trouble: [EMAIL PROTECTED] cat test.c main () { printf ("hello\n"); exit (56); } [EMAIL PROTECTED] amd64-kfreebsd-gnu-gcc test.c -g -o test -static ; brandelf -t FreeBSD test test.c: In function 'main': test.c:3: warning: incompatibl