Subject: init: segmentation violation
To: None <hls@oce.nl>
From: Gordon W. Ross <gwr@jericho.mc.com>
List: port-sun3
Date: 07/01/1994 17:17:55
> From: "Harry Schreurs" <HLS@oce.nl>
> Date:          Fri, 1 Jul 1994 18:35:17 GMT +0100
> 
> Gordon,
> 
> Let me first express my gratitude to the work you are doing.
Thanks to Adam too... (and all the other contributing hackers).

> When I use the stuff, that was available on:
>     
>      Fri Jul  1 12:57:30 MET DST 1994
> 
> I get the following message on the console, when trying to
> run `csh':
> 
>     panic: trap: sig not set

Oh. That's my fault.  I misunderstood some of the amiga code I
integrated.  The patch below fixes this problem.

*** trap.c.~6~	Wed Jun 29 23:20:19 1994
--- trap.c	Fri Jul  1 16:57:46 1994
***************
*** 507,519 ****
  		break;
  	    }
  	}
! #ifdef	DIAGNOSTIC
! 	if (sig == 0)
! 		panic("trap: sig not set");
! #endif
! 	trapsignal(p, sig, ucode);
  	if ((type & T_USER) == 0)
  		return;
  out:
  	userret(p, &frame, sticks);
  }
--- 507,518 ----
  		break;
  	    }
  	}
! 	/* If trap was from supervisor mode, just return. */
  	if ((type & T_USER) == 0)
  		return;
+ 	/* Post a signal if necessary. */
+ 	if (sig != 0)
+ 		trapsignal(p, sig, ucode);
  out:
  	userret(p, &frame, sticks);
  }

> > > Also I noticed, that the size of the kernel did change dramatically.
Your config looks OK...

> Does this differ much with what you get?
... but your text size is much larget than I get.

> Maybe my development environment isn't OK!
> I'am using:
>     gas: 2.3
>     gcc: 2.5.8
>     ld: SUNOS 4.1.1_U1

I've heard that some recent versions of gcc produce larget 68k code
than some previous versions, but sorry, I don't have specifics.
I'm using gcc-2.3.3 and ddb tells me:

 text:     619136
 data:     108168
  bss:      63128
 syms:      39024
entry: 0x0E004000
trsiz:          0
drsiz:          0
/home/roo/root/netbsd: warning: non-standard entry point: 0x0e004000
        expecting entry=0x2000
.data segment  va: 0x0E09B280
db_symtabsize  va: 0x0E09DAB0
db_symtab      va: 0x0E09DAB4
db_symtabsize off: 0x00002830
db_symtab     off: 0x00002834
strtab_len: 40674
db_symtabsize val: 0x00013880 (80000)
Symbols use 79698 of 80000 bytes available (99%)
copying symbol table...
...done

> P.S. Can you put announcements of source changes, that are relevant
> to the sun3-port also in the `port-sun3' mailing list? I don't get
> the `source-changes' mailing list anymore and I'm also unable to
> get back on this list!

I'll try to announce the important ones (when things work).

Gordon Ross

------------------------------------------------------------------------------