Subject: sparc -current trouble
To: None <port-sparc@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: port-sparc
Date: 06/06/1995 15:25:46
I was trying to bring "my" SPARC up from May 9th to -current. With a
source tree freshed by sup as of 11:06 (Eastern) today, I find that
something serious appears to be wrong with crt0.
% cat xhi.c
main(){printf("Hello, world!\n");}
% cc -o xhi xhi.c
% ktrace xhi
Bad system call (core dumped)
% kdump
880 ktrace RET ktrace 0
880 ktrace CALL __sysctl(0xf7fff3e8,0x2,0xf350,0xf7fff3e4,0,0)
880 ktrace RET __sysctl 4
880 ktrace CALL break(0xf3b0)
880 ktrace RET break 0
880 ktrace CALL break(0xfffc)
880 ktrace RET break 0
880 ktrace CALL break(0x10ffc)
880 ktrace RET break 0
880 ktrace CALL execve(0xf7fff530,0xf7fffa00,0xf7fffa08)
880 ktrace NAMI "./xhi"
880 xhi RET execve 0
880 xhi CALL open(0x20d0,0,0)
880 xhi NAMI "/usr/libexec/ld.so"
880 xhi RET open 3
880 xhi CALL read(0x3,0xf7fff958,0x20)
880 xhi GIO fd 3 read 32 bytes
"\M-@\M^J\^A\v\0\0\M-`\0\0\0 \0\0\0\0\0\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0"
880 xhi RET read 32/0x20
880 xhi CALL syscall
880 xhi PSIG SIGSYS SIG_DFL
880 xhi NAMI "xhi.core"
%
This happens even after recompiling and reinstalling libc, crt0, ld,
ld.so, and a kernel, which covers everything I could think of that
might be relevant.
But if I link it static, it works. And if I link it (with a "by hand"
ld command) with my crt0, which is a slight modification of a previous
version's crt0, it works.
Based on a quick look at the crt0 source, this appears to be the kernel
not liking the __syscall2() call that the mmap() in csu/common.c
expands into...but the kernel source doesn't look wrong. Anyone have
any ideas what could be going awry, or should I dive into serious
debugging, meanwhile using src/lib/csu from the May 9th sources?
der Mouse
mouse@collatz.mcrcim.mcgill.edu