Subject: Re: Patch to libc for sun3x
To: None <jeremy@broder.com>
From: Gordon W. Ross <gwr@mc.com>
List: port-sun3
Date: 05/09/1997 10:24:48
Here is the fix I recommend. Apply this and rebuild libc.
*** src/sys/sys/exec.h.orig Thu Jan 23 11:34:43 1997
--- src/sys/sys/exec.h Fri May 9 10:22:12 1997
***************
*** 61,70 ****
};
/*
! * Address of ps_strings structure (in user space).
*/
#define PS_STRINGS \
((struct ps_strings *)(USRSTACK - sizeof(struct ps_strings)))
/*
* Below the PS_STRINGS and sigtramp, we may require a gap on the stack
--- 61,78 ----
};
/*
! * Address of ps_strings structure. In user space, we get this
! * from a variable set in crt0 (because the stack address may not
! * be constant across all machines where the program might run).
! * In the kernel, this is just a constant.
*/
+ #ifdef _KERNEL
#define PS_STRINGS \
((struct ps_strings *)(USRSTACK - sizeof(struct ps_strings)))
+ #else /* _KERNEL */
+ extern struct ps_strings *__ps_strings;
+ #define PS_STRINGS __ps_strings;
+ #endif /* _KERNEL */
/*
* Below the PS_STRINGS and sigtramp, we may require a gap on the stack