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: [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 shared library executables. [...] I suspect it has something to do with missing changes that freebsd didn't push into upstream binutils. -- Robert Millan -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]