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) <= 6, it works fine.
- When strlen(argv) > 6:
- If the executable is dynamicaly linked, runs as if it were ld.so.
- If static, segfaults (SIGILL if you run in ktrace).
argc = 1
argv = ./test
Usage: ld.so [OPTION]... EXECUTABLE-FILE [ARGS-FOR-PROGRAM...]
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.