Loading and Executing Object Code at Runtime
Sean Eric Fagan
sef at kithrup.COM
Sat Feb 16 21:09:46 AEST 1991
In article <6073 at auspex.auspex.com> guy at auspex.auspex.com (Guy Harris) writes:
>What's "data space", and how is it different from any other sort of
>space? (Most UNIX systems run with a flat address space on 386es. PTEs
>on the 386 only have a "writable" bit.)
Xenix had split I&D for the '386, I believe. As for '386 unices, even those
with "flat" address spaces don't really have them; what they do is set cs
and ds (and es, and ss) to point to the same memory range. *However*, you
still cannot execute data; you have to execute code. Consider it as an
alias of forms.
How does this affect people? Well, consider the following code, which is
somewhat similar to code I ran into recently:
push byte1
push byte2
; ...
call @esp
Oops. ss is a readable and writable segment, not an executable segment.
Memory-fault, core-dump. (Note: to make it work, all you have to do is
spit out a segment prefix [a la 'call cs:@esp'].)
Anyway, just a bunch of nit-picking, because I can't fall asleep yet...
--
Sean Eric Fagan | "I made the universe, but please don't blame me for it;
sef at kithrup.COM | I had a bellyache at the time."
-----------------+ -- The Turtle (Stephen King, _It_)
Any opinions expressed are my own, and generally unpopular with others.
More information about the Comp.unix.internals
mailing list