home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sunic!lunic!eru.mt.luth.se!enterpoop.mit.edu!ira.uka.de!math.fu-berlin.de!news.th-darmstadt.de!rbg.informatik.th-darmstadt.de!misar
- From: misar@rbg.informatik.th-darmstadt.de (walter misar)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Position independant code ?
- Message-ID: <1992Dec11.194521@rbg.informatik.th-darmstadt.de>
- Date: 11 Dec 92 18:45:21 GMT
- References: <Bz27o7.955@usenet.ucs.indiana.edu>
- Sender: news@news.th-darmstadt.de (The News System)
- Organization: TU Darmstadt
- Lines: 25
- Nntp-Posting-Host: rbhp58.rbg.informatik.th-darmstadt.de
-
- In article <Bz27o7.955@usenet.ucs.indiana.edu>, ejames@venus.iucf.indiana.edu (ERIC JAMES) writes:
- > The assembly output of the compiler I use looks like position dependant code
- > to me, here is an example.
- >
- > move.b #4,_variable
- >
- > Where _variable will be defined as a data storage area latter. The output
- > is then assembled using a68k and linked with blink. Do either of these change
- > the code into position independant code? I am under the impression that all
- > programs that work under the operating system MUST be position independant.
- > The only other solution I can come up with is that the system might decide where
- > in memory the program is to be loaded, and durring loading it fills in the
- > actual memory locations, but I'm not sure. Any help would be appreciated
-
- Yes, the code is position dependant.
- Programs working under the operating system needn't to be position
- independant because whenever a program is loaded into memory, all position
- dependant references to variables get corrected (There are some hunks, which
- names I can't remember right now, where all position dependant adressings are
- stored).
- Yep, youre assumption is correct.
-
- --
- Walter Misar
- misar@rbhp56.rbg.informatik.th-darmstadt.de
-