home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / amiga / programm / 17218 < prev    next >
Encoding:
Internet Message Format  |  1992-12-11  |  1.8 KB

  1. 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
  2. From: misar@rbg.informatik.th-darmstadt.de (walter misar)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Position independant code ?
  5. Message-ID: <1992Dec11.194521@rbg.informatik.th-darmstadt.de>
  6. Date: 11 Dec 92 18:45:21 GMT
  7. References: <Bz27o7.955@usenet.ucs.indiana.edu>
  8. Sender: news@news.th-darmstadt.de (The News System)
  9. Organization: TU Darmstadt
  10. Lines: 25
  11. Nntp-Posting-Host: rbhp58.rbg.informatik.th-darmstadt.de
  12.  
  13. In article <Bz27o7.955@usenet.ucs.indiana.edu>, ejames@venus.iucf.indiana.edu (ERIC JAMES) writes:
  14. >   The assembly output of the compiler I use looks like position dependant code
  15. > to me, here is an example.
  16. >       move.b   #4,_variable
  17. >   Where _variable will be defined as a data storage area latter.  The output
  18. > is then assembled using a68k and linked with blink.  Do either of these change
  19. > the code into position independant code?  I am under the impression that all
  20. > programs that work under the operating system MUST be position independant.
  21. > The only other solution I can come up with is that the system might decide where
  22. > in memory the program is to be loaded, and durring loading it fills in the
  23. > actual memory locations, but I'm not sure.  Any help would be appreciated
  24.  
  25. Yes, the code is position dependant.
  26. Programs working under the operating system needn't to be position
  27. independant because whenever a program is loaded into memory, all position
  28. dependant references to variables get corrected (There are some hunks, which
  29. names I can't remember right now, where all position dependant adressings are
  30. stored).
  31. Yep, youre assumption is correct. 
  32.  
  33. -- 
  34. Walter Misar
  35. misar@rbhp56.rbg.informatik.th-darmstadt.de
  36.