can't do ptr math on void *
This commit is contained in:
parent
c120d36cd8
commit
92da9d2f33
|
@ -37,7 +37,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 8.3 (Berkeley) 1/12/94
|
||||
* $Id: machdep.c,v 1.12 1994/07/05 21:25:07 glass Exp $
|
||||
* $Id: machdep.c,v 1.13 1994/08/18 22:11:22 cgd Exp $
|
||||
*/
|
||||
|
||||
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
|
||||
|
@ -2139,14 +2139,14 @@ cpu_exec_aout_makecmds(p, epp)
|
|||
}
|
||||
|
||||
#ifdef COMPAT_ULTRIX
|
||||
|
||||
void cpu_exec_ecoff_setup(p, epp)
|
||||
struct proc *p;
|
||||
struct exec_package *epp;
|
||||
{
|
||||
struct ecoff_aouthdr *eap;
|
||||
|
||||
eap = epp->ep_hdr + sizeof(struct ecoff_filehdr);
|
||||
eap = (struct ecoff_aouthdr *)
|
||||
((caddr_t)epp->ep_hdr + sizeof(struct ecoff_filehdr));
|
||||
p->p_md.md_regs[GP] = eap->ea_gp_value;
|
||||
}
|
||||
|
||||
|
@ -2168,5 +2168,4 @@ cpu_exec_ecoff_hook(p, epp, eap)
|
|||
epp->ep_setup = cpu_exec_ecoff_setup;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: exec_ecoff.c,v 1.4 1994/08/01 14:04:47 glass Exp $ */
|
||||
/* $NetBSD: exec_ecoff.c,v 1.5 1994/08/18 22:09:35 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Adam Glass
|
||||
|
@ -82,7 +82,8 @@ exec_ecoff_makecmds(p, epp)
|
|||
if (ECOFF_BADMAG(efp))
|
||||
return ENOEXEC;
|
||||
|
||||
eap = epp->ep_hdr + sizeof(struct ecoff_filehdr);
|
||||
eap = (struct ecoff_aouthdr *)
|
||||
((caddr_t)epp->ep_hdr + sizeof(struct ecoff_filehdr));
|
||||
switch (eap->ea_magic) {
|
||||
case ECOFF_OMAGIC:
|
||||
error = exec_ecoff_prep_omagic(p, epp, efp, eap);
|
||||
|
|
Loading…
Reference in New Issue