This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: How to generate map file.
- To: " Clark Sims " <clarksimsgnu at my-Deja dot com>
- Subject: Re: How to generate map file.
- From: Mumit Khan <khan at nanotech dot wisc dot EDU>
- Date: Thu, 23 Sep 1999 02:44:11 -0500
- cc: "cygwin at sourceware dot cygnus dot com" <cygwin at sourceware dot cygnus dot com>
" Clark Sims " <clarksimsgnu@my-Deja.com> writes:
> System: NT 4 SV5
> Compiler: b20.1 Gcc 2.95
>
> How does one generate a map file. I have tried using the standard flags, -Map
> -Wi but the compiler doesn't seem to recognize them.
>
To pass a linker flag, you need to to -Wl, and the linker flags you
want to pass you can get from the linker (ld) documentation.
$ gcc -o foo.exe -Wl,-Map,foo.map foo.c
will produce a foo.map file.
To dump the map to standard error, use --print-map or -M. You should also
consider adding -Wl,--cref for cross-referencing.
$ gcc -o foo.exe -Wl,-M foo.c 2>&1 | less
$ gcc -o foo.exe -Wl,--print-map foo.c 2>&1 | less
Regards,
Mumit
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com