Subject: Illegal instruction on dynamic linked binaries
To: None <port-sparc@NetBSD.ORG>
From: Harald Barth <haba@pdc.kth.se>
List: port-sparc
Date: 02/12/1997 14:19:55
Hi,

I encounter a strange problem when using the current sparc
distribution on a Sun4/690 (Just 1 processor, no vme devices
connected). The kernel boots OK to single user, but all binaries that
are dynamically linked dump with "Illegal Instruction". As most useful
binaries (cc ld gdb) crash, too, I'm kind of stuck. Anyone out there
who can help me to get started? (I have an account on a Sparc2 running
NetBSD 1.2 if that would help me).

Thanks and regards,
Harald.

Output during boot:

<#0> ok boot disk -s
Boot device: /iommu/sbus/dma@f,81000/esp@f,80000/sd@3,0  File and args: -s
>> NetBSD BOOT [$Revision: 1.4 $]
Booting netbsd @ 0x4000
1155040+109808+66808+[71412+82637]=0x16eb91
(if this doesn't work, fix pmap_bootstrap4m in pmap.c)Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 1.2B (GENERIC) #11: Tue Dec 10 00:24:14 MET 1996
    pk@flambard:/usr/src/sys/arch/sparc/compile/GENERIC
real mem = 66633728
avail mem = 60338176
using 813 buffers containing 3330048 bytes of memory
bootpath: /iommu@f,e0000000/sbus@f,e0001000/dma@f,81000/esp@f,80000/sd@3,0
mainbus0 (root): SUNW,SPARCsystem-600
cpu0 at mainbus0: Cypress,CY605 @ 40 MHz, RT602 or WTL3171 FPU
cpu0: physical 64K combined cache (32 bytes/line) cache enabled
obio0 at mainbus0
clock0 at obio0 addr 0xf1200000: mk48t08 (eeprom)
timer0 at obio0 addr 0xf1300000 delay constant 1
zs0 at obio0 addr 0xf1100000 pri 12, softpri 6
zs0a: console i/o
zs1 at obio0 addr 0xf1000000 pri 12, softpri 6
audio0 at obio0 addr 0xf1500000 pri 13, softpri 4
[leds at obio0] addr 0xf1600000 not configured
iommu0 at mainbus0 ioaddr 0xe0000000: version 1/0, page-size 4096, range 64MB
sbus0 at iommu0: clock = 20 MHz
dma0 at sbus0 slot 15 offset 0x81000: rev esc
esp0 at dma0 slot 0xf offset 0x80000 pri 4: ESP200 25Mhz, target 7
scsibus0 at esp0
probe(esp0:3:0): max sync rate 10.00Mb/s
sd0 at scsibus0 targ 3 lun 0: <IBMRISC, 0664M1H, 5 51> SCSI2 0/direct fixed
sd0: 1920MB, 2857 cyl, 15 head, 91 sec, 512 bytes/sec
lebuffer0 at sbus0 slot 15 offset 0x40000
le0 at lebuffer0 slot 0xf offset 0x60000 pri 6: address 08:00:20:0e:65:ab
le0: 64 receive buffers, 16 transmit buffers
vme at iommu0 not configured
root on sd0a
Enter pathname of shell or RETURN for sh: 
# fsck
** /dev/rsd0a
** File system is clean; not checking
** /dev/rsd0g
** Last Mounted on /usr
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
20063 files, 277538 used, 405269 free (10197 frags, 49384 blocks, 1.5% fragmentation)

MARK FILE SYSTEM CLEAN? [yn] y


***** FILE SYSTEM WAS MODIFIED *****
# mount -a
# /usr/bin/strip # or ldd or cc or ....
Illegal instruction - core dumped
#