> Thanks.  It just occurs to me that Linux kernel used to have something
> like this in routine BUG():
> 
>  * ((char *) 0) = 0;
> 
> It is called when there is a kernel bug.  So address 0 should not be
> mapped writable, otherwise all C statements " char * p = NULL; * p =
> value; " would be legal.
> 
> The book "Unix Internals - A Practical Approach" by S.D. Pate has a figure
> showing in ELF format, the stack lies BELOW the code segment and grows
> downwards.  This might have something to do with code starting from
> 0x8048000.
>

Also remember that for CPUs with virtually indexed caches, base addresses
for text, data, and stack matter a great deal.  Perhaps this is a
remanence?

For reference, see: "UNIX Systems for Modern Architectures" by Curt
Schimmel, chapter 7.



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to