[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: segfaults on amd64

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:

  - When strlen(argv[0]) <= 6, it works fine.

  - When strlen(argv[0]) > 6:
     -  If the executable is dynamicaly linked, runs as if it were ld.so.
     -  If static, segfaults (SIGILL if you run in ktrace).

Test example:

rmh@orthanc:/tmp$ ./test
argc = 1
argv[0] = ./test
rmh@orthanc:/tmp$ /tmp/test
You have invoked `ld.so', the helper program for shared library executables.

I suspect it has something to do with missing changes that freebsd didn't push
into upstream binutils.

Robert Millan

Reply to: