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