Subject: port-sparc64/28930: 32-bit ld does not seem to work with compat_netbsd32, hence gcc cannot build working 32-bit executables
To: None <port-sparc64-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <sigsegv@rambler.ru>
List: netbsd-bugs
Date: 01/10/2005 16:21:00
>Number:         28930
>Category:       port-sparc64
>Synopsis:       32-bit ld does not seem to work with compat_netbsd32, hence gcc cannot build working 32-bit executables
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-sparc64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 10 16:21:00 +0000 2005
>Originator:     Roman Duka
>Release:        2.0
>Organization:
>Environment:
NetBSD u10 2.0 NetBSD 2.0 (GENERIC) #1: Sat Jan 8 15:39:04 UTC 2005 root@athlon1000:/usr/obj.sparc64/sys/arch/sparc64/compile/GENERIC sparc64
>Description:
When running in compat_netbsd32 compatibility mode, for some reason 'ld' and 'objdump' cannot recognize certain startup object files, i.e. /usr/lib/crt* files
>How-To-Repeat:
unpack sparc distribution sets for NetBSD-2.0 into /emul/netbsd32

# chroot /emul/netbsd32 /bin/sh
# cd /tmp
# cat > test.c
int main(void) {}
press CTRL-D
# gcc -c test.c
# file test.o
test.o: ELF 32-bit MSB relocatable, SPARC, version 1 (SYSV), not stripped
# gcc test.c
/usr/lib/crt0.o: file not recognized: File truncated

>Fix: