Xref: utzoo comp.unix.questions:24229 comp.unix.wizards:23236 comp.lang.c:30711 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!mit-eddie!aryeh From: aryeh@eddie.mit.edu (Aryeh M. Weiss) Newsgroups: comp.unix.questions,comp.unix.wizards,comp.lang.c Subject: Re: _why_ does the UNIX linker not distinguish text and data addresses??? Message-ID: <1990Aug1.200619.28877@eddie.mit.edu> Date: 1 Aug 90 20:06:19 GMT References: <1990Jul30.104726.22660@mtcchi.uucp> <37909@ucbvax.BERKELEY.EDU> Reply-To: aryeh@eddie.MIT.EDU (Aryeh M. Weiss) Distribution: na Organization: MIT EE/CS Computer Facilities, Cambridge, MA Lines: 15 In article <37909@ucbvax.BERKELEY.EDU> edward@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. --