Path: utzoo!utgpu!water!watmath!clyde!rutgers!mit-eddie!uw-beaver!apollo!mrst!sdti!mjy From: mjy@sdti.UUCP (Michael J. Young) Newsgroups: comp.unix.wizards Subject: Aliasing text and data segments of a process Message-ID: <202@sdti.UUCP> Date: 20 Jan 88 22:24:00 GMT Reply-To: mjy@sdti.UUCP (Michael J. Young) Organization: Software Development Technologies, Sudbury MA Lines: 15 Is there a way in Unix to create an "alias" between the text and data segments of a process? More specifically, how does one go about executing a block of code that was generated in a data segment? I'm not really talking about self-modifying code, in which a program attempts to modify its own text segment, but rather self-generating code, in which a program "compiles" a block of code into its data segment (created via malloc() perhaps?) and then tries to execute it. An obvious application of this might be an incremental compiler, but I can think of other reasons why I might want to do this as well. -- Mike Young - Software Development Technologies, Inc., Sudbury MA 01776 UUCP : {decvax,harvard,linus,mit-eddie}!necntc!necis!mrst!sdti!mjy Internet : mjy%sdti.uucp@harvard.harvard.edu Tel: +1 617 443 5779