home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / atari / st / 18635 < prev    next >
Encoding:
Text File  |  1992-12-21  |  2.8 KB  |  71 lines

  1. Newsgroups: comp.sys.atari.st
  2. Path: sparky!uunet!spool.mu.edu!umn.edu!csus.edu!netcom.com!ersmith
  3. From: ersmith@netcom.com (Eric R. Smith)
  4. Subject: Re: gcc baserel tcsh etc (was Re: Virtual Memory on MultiTos)
  5. Message-ID: <1992Dec19.055151.27616@netcom.com>
  6. Organization: Netcom Online Communications Services (408-241-9760 login: guest)
  7. References: <1992Dec16.201905.2006@netcom.com> <1992Dec16.043917.1193@cc.umontreal.ca> <1gt7r0INNhrd@usenet.INS.CWRU.Edu>
  8. Date: Sat, 19 Dec 1992 05:51:51 GMT
  9. Lines: 60
  10.  
  11. In article <1gt7r0INNhrd@usenet.INS.CWRU.Edu> an375@cleveland.Freenet.Edu (Jason Baker) writes:
  12. >
  13. >>If the program was compiled so that it doesn't have any absolute
  14. >>references to data (e.g. it uses an address register as a base pointer)
  15. >>then this is possible. However, most programs cannot be so shared,
  16. >>because they do contain absolute references (and thus every copy of
  17. >>the program would share the same data and variables).
  18. >>
  19. >>(gcc can compile shared text programs if it is given the -mbaserel
  20. >>parameter)
  21.  
  22. >    I was wondering what that meant.  The new mintlib readme metions 
  23. >-mpcrel (or something).  What does this mean; under what conditions will
  24. >gcc generate non-pc-relative code?
  25.  
  26. -mbaserel means "use a base register for all data", or in other words
  27. "more than one copy of this program may be using the same image
  28. in memory, so don't assume that data always follows the program in
  29. memory". This option is essential for allowing shared text programs;
  30. without it programs use absolute addresses and so each copy of
  31. the program must be loaded and relocated in its entirety
  32. every time.
  33.  
  34. -mpcrel means "use PC-relative addressing for constant data. e.g.
  35. strings". This results in a small savings in time and space, and
  36. means that constant data can be put into the text segment and
  37. thus shared between multiple invocations of the program (assuming
  38. that -mbaserel was also used).
  39.  
  40. >  Does the new gcc support both shared 
  41. >and private data in the same program?
  42.  
  43. Only if the shared data is constant (or at least declared constant).
  44.  
  45. >    I would also like to bother you about tcsh.  I have version 6.00.02,
  46. >and it doesn't complete dir names.
  47.  
  48. I don't understand; directory names are completed for me (except at
  49. the beginning of the line).
  50.  
  51. >  Is 6.02.00 available?
  52.  
  53. I haven't seen it. If the Unix source is available, porting it to
  54. the ST wouldn't be hard. (Note that I'm not offering to do the
  55. port, I don't have time.)
  56.  
  57. >  Also, would it 
  58. >be fairly simple to support threading and other options through shell_p?
  59.  
  60. No.
  61.  
  62. >And finally, how come tcsh needs such a huge stack?
  63.  
  64. Because all memory is allocated from the stack; tcsh has a very
  65. silly memory management algorithm that assumes Unix like semantics
  66. for sbrk(), i.e. that all the chunks of memory you allocate are
  67. contiguous.
  68. --
  69. Eric Smith    ersmith@netcom.com    ersmith@atari.uucp
  70. Not an official Atari spokesperson.
  71.