Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!elroy.jpl.nasa.gov!usc!nic.csu.net!csun!kithrup!sef From: sef@kithrup.COM (Sean Eric Fagan) Newsgroups: comp.unix.internals Subject: Re: Loading and Executing Object Code at Runtime Message-ID: <1991Feb16.100946.601@kithrup.COM> Date: 16 Feb 91 10:09:46 GMT References: <1991Feb14.182925.15793@mtxinu.COM> <6073@auspex.auspex.com> Organization: Kithrup Enterprises, Ltd. Lines: 30 In article <6073@auspex.auspex.com> guy@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@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.