_why_ does the UNIX linker not distinguish text and data addresses???
Aryeh M. Weiss
aryeh at eddie.mit.edu
Thu Aug 2 06:06:19 AEST 1990
In article <37909 at ucbvax.BERKELEY.EDU> edward at ucbarpa.Berkeley.EDU.UUCP (Edward Wang) writes:
>Well, it allows data to be executed. Rather, the difference
>between text and data is that text can be read-only and shared,
>not that data is not executable. Given that, it would be
>incorrect for the linker to signal an error.
>
Under SCO Xenix 386 with the SCO linker, this does produce an error.
This is because of the segmented memory model used on the Intel
processors. (The linker bombs with a `fixup' error.) Text is text,
data is data, and never the twain as they say. Also data is not
executable, at least by default. The exception is when building small
model impure 8086/80286 programs, the linker does not produce an error.
--
More information about the Comp.unix.questions
mailing list