home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / amiga / programm / 18563 < prev    next >
Encoding:
Text File  |  1993-01-12  |  3.5 KB  |  84 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!well!comeau
  3. From: comeau@csanta.attmail.com (Greg Comeau)
  4. Subject: Re: Version Strings...
  5. Message-ID: <C0qvC0.M9L@well.sf.ca.us>
  6. Originator: comeau@well.sf.ca.us
  7. Sender: news@well.sf.ca.us
  8. Reply-To: comeau@csanta.attmail.com (Greg Comeau)
  9. Organization: Comeau Computing
  10. References: <24661@hacgate.SCG.HAC.COM> <C0KBM1.Kun@well.sf.ca.us> <24689@hacgate.SCG.HAC.COM>
  11. Date: Tue, 12 Jan 1993 14:09:35 GMT
  12. Lines: 70
  13.  
  14. In article <24689@hacgate.SCG.HAC.COM> johnl@SDFSERV.hac.com (John Lee) writes:
  15. >In article <C0KBM1.Kun@well.sf.ca.us> comeau@csanta.attmail.com (Greg Comeau) writes:
  16. >>In article <24661@hacgate.SCG.HAC.COM> johnl@SDFSERV.hac.com (John Lee) writes:
  17. >>>....  By then, it's too late since the
  18. >>>linker can't throw out things in a module.
  19. >>
  20. >>What can't it throw it away?  (I obviously feel it can).
  21. >
  22. >The answer is...it _can_!  *BUT* the linker and the object code
  23. >generators (be it assembler or compiler) must cooperate in a way that
  24. >they current don't.
  25.  
  26. I have a feeling we went from a generic concept to a specific
  27. product.  You imply that no Amiga linker has this capability.
  28. I have honestly never looked, but that that is so does not dispute
  29. that it is technically possible to do so.
  30.  
  31. Yes indeed, the info et al generated by the compiler would have to be
  32. detailed enough to enable this to occur.
  33.  
  34. >Currently, BLink and most traditional linkers operate at the "module"
  35. >level, where (usually) one source file equals one object module.  At
  36. >this level, the linker can detect that a module has no references to
  37. >it, assuming that it's not the startup module, and easily throw it
  38. >out.  (I don't know of any linker that does this, however.)
  39.  
  40. Again, I don't know about on the Amiga, but I know of other linkers
  41. on other platforms that do this.  And speaking of traditional,
  42. if I remember correctly (and no, I'm not showing my age ;-}),
  43. even the MVT/MVS linkers had this capability.
  44.  
  45. >It can't
  46. >throw out parts of a module because of internal references (i.e.
  47. >offsets) not mentioned in the symbol table.  It can't removing strings
  48. >from the middle of a module without adjusting those internal
  49. >references.
  50.  
  51. So it adjusts them.
  52.  
  53. >But why complicate an already complicated link process?  The whole
  54. >point is to clean up stuff the programmer has left in by accident.  I
  55. >have a better idea... ......If you don't want nonsense to
  56. >clutter your executables, use "lint"-like tools or have the compiler
  57. >warn you about the nonsense.
  58.  
  59. Both are great things and great even at the points of time where
  60. the diagnostics can be uttered.  However, my past experiences have
  61. led me off where I had to use both 3rd party header files and
  62. 3rd party object code.  Either I couldn't lint it, or shouldn't
  63. lint it.  If I care, that only leaves me other alternatives.
  64.  
  65. >I think SAS/C will warn you about
  66. >non-referenced statics, but not about non-referenced globals
  67. >(externally-visible symbols.)  "lint" will warn you about both.
  68.  
  69. Only in the presense of source code I can change.
  70. Hopefully I get a shot at complaining about some ill constructions
  71. or artisty shoved at me, but we don't always have that liberty.
  72.  
  73. >The bottom line?  "lint" is your _friend_.  Everybody should get to know
  74. >their friends.
  75.  
  76. The bottom line to me is more like use what you can use until you can't.
  77.  
  78. - Greg
  79. -- 
  80.          Comeau Computing, 91-34 120th Street, Richmond Hill, NY, 11418
  81.                 Producers of Comeau C++ 3.0/3.0.1 With Templates
  82.           Here:attmail.com!csanta!comeau / BIX:comeau / CIS:72331,3421
  83.         Voice:718-945-0009 / Fax:718-441-2310 / Prodigy: tshp50a
  84.