home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / amiga / programm / 12692 < prev    next >
Encoding:
Text File  |  1992-08-25  |  1.6 KB  |  38 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!jvnc.net!yale.edu!ira.uka.de!chx400!bernina!wild
  3. From: wild@nessie.cs.id.ethz.ch (Markus Wild)
  4. Subject: Re: GCC and ld .. How to get a Link Map?
  5. Message-ID: <1992Aug26.015817.16080@bernina.ethz.ch>
  6. Sender: news@bernina.ethz.ch (USENET News System)
  7. Organization: Swiss Federal Institute of Technology (ETH), Zurich, CH
  8. References: <1992Aug24.234512.19497@ultb.isc.rit.edu>
  9. Date: Wed, 26 Aug 1992 01:58:17 GMT
  10. Lines: 26
  11.  
  12. In article <1992Aug24.234512.19497@ultb.isc.rit.edu> rbm2273@ultb.isc.rit.edu (R.B. Mead ) writes:
  13. >How do I use GCC to tell 'ld' to output a Link/Load Map?
  14. >You know, symbol names and relocation addresses, information
  15. >regarding libraries used, etc.
  16. >
  17. >I'd like to have the output go to a file, if possible.
  18. >
  19. >Also, In a previous version of GNU C I was able to have compilation
  20. >statistics output.  I haven't been able to do this lately.
  21.  
  22. The link/load map is actually a feature of ld, not of gcc itself. So all
  23. you have to do is to use the -Xlinker option to pass the option straight
  24. to ld. If I recall right, the -m option generates a mapfile on stdout, so
  25. you'd have to redirect output to a file when linking. If it's -m, you'd
  26. use
  27.  
  28.   gcc ... -Xlinker -m .. > map-file
  29.  
  30. You can get a lot more of mostly debugging information when specifying the
  31. trace flag, I think it's -t. Do a ld +help to get the available options.
  32.  
  33. -Markus
  34. -- 
  35. Markus M. Wild    -  wild@nessie.cs.id.ethz.ch  |  wild@amiga.physik.unizh.ch 
  36. Vital papers will demonstrate their vitality by spontaneously moving
  37. from where you left them to where you can't find them.
  38.