home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / gnu / g / help / 1215 < prev    next >
Encoding:
Text File  |  1992-09-10  |  1.2 KB  |  39 lines

  1. Newsgroups: gnu.g++.help
  2. Path: sparky!uunet!wupost!csus.edu!netcom.com!bitbug
  3. From: bitbug@netcom.com (James Buster)
  4. Subject: problem with collect in g++ 2.x
  5. Message-ID: <08tns8+.bitbug@netcom.com>
  6. Date: Fri, 11 Sep 92 01:19:37 GMT
  7. Organization: Lynx Real-Time Systems, Inc.
  8. Lines: 29
  9.  
  10. Collect appears to be working incorrectly.
  11.  
  12. Here is my understanding of how collect is supposed to work, given the command
  13. line
  14.     /path/collect -o t t.o -lg++
  15.  
  16. /path/real-ld -r -o /path/to/temp/file t.o -lg++
  17.  
  18. scan output of "nm -p /path/to/temp/file" to find constructors/destructors.
  19.  
  20. Create an assembly language file (/path/to/asm/file.s).
  21.  
  22. /path/to/c/compiler -c /path/to/asm/file.s -o /path/to/asm/file.o
  23.  
  24. /path/real-ld -o t /path/to/temp/file /path/to/asm/file.o
  25.  
  26. We are now finished linking. Instead, collect appears to do this:
  27.  
  28. /path/real-ld -o t t.o -lg++
  29.  
  30. Note the lack of -r, and the wrong output file name. Our linker complains
  31. about symbols not being resolved (constructors), and the link fails. Since
  32. the link failed, nm is never called.
  33.  
  34. This seems so wrong that either I have done something horribly wrong, or
  35. collect is rather broken.
  36. -- 
  37.                 James Buster
  38.                  bitbug@netcom.com
  39.