public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* How to generate map file.
@ 1999-09-22 17:44  Clark Sims 
  1999-09-22 18:18 ` Brendan Simon
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From:  Clark Sims  @ 1999-09-22 17:44 UTC (permalink / raw)
  To: cygwin

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.


--== Sent via Deja.com http://www.deja.com/ ==--
Share what you know. Learn what you don't.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to generate map file.
  1999-09-22 17:44 How to generate map file  Clark Sims 
@ 1999-09-22 18:18 ` Brendan Simon
  1999-09-30 23:42   ` Brendan Simon
  1999-09-23  0:45 ` Mumit Khan
  1999-09-30 23:42 `  Clark Sims 
  2 siblings, 1 reply; 6+ messages in thread
From: Brendan Simon @ 1999-09-22 18:18 UTC (permalink / raw)
  To: Clark Sims; +Cc: cygwin

Clark Sims wrote:

> 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.

You need to consult the GCC and GLD manuals.  There are some online at www.gnu.org or www.objsw.com.

The linker generates the map file and there are two options.  -M outputs to standard output and -Map <file> outputs to a file.

try these:
$ ld prog.o -M > prog.map
$ ld prog.o -Map prog.map
$ gcc prog.c -Wl,-M > prog.map (I'm not sure if this is will work)
$ gcc prog.c -Wl,-Map,prog.map

$ gcc prog.c -Map prog.map might work as I think gcc passes any unknown command line options to the linker.  If not, then you have to
use -Wl if using gcc to link.

Brendan Simon.


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to generate map file.
  1999-09-22 17:44 How to generate map file  Clark Sims 
  1999-09-22 18:18 ` Brendan Simon
@ 1999-09-23  0:45 ` Mumit Khan
  1999-09-30 23:42   ` Mumit Khan
  1999-09-30 23:42 `  Clark Sims 
  2 siblings, 1 reply; 6+ messages in thread
From: Mumit Khan @ 1999-09-23  0:45 UTC (permalink / raw)
  To:  Clark Sims ; +Cc: cygwin

" 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to generate map file.
  1999-09-22 17:44 How to generate map file  Clark Sims 
  1999-09-22 18:18 ` Brendan Simon
  1999-09-23  0:45 ` Mumit Khan
@ 1999-09-30 23:42 `  Clark Sims 
  2 siblings, 0 replies; 6+ messages in thread
From:  Clark Sims  @ 1999-09-30 23:42 UTC (permalink / raw)
  To: cygwin

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.


--== Sent via Deja.com http://www.deja.com/ ==--
Share what you know. Learn what you don't.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to generate map file.
  1999-09-22 18:18 ` Brendan Simon
@ 1999-09-30 23:42   ` Brendan Simon
  0 siblings, 0 replies; 6+ messages in thread
From: Brendan Simon @ 1999-09-30 23:42 UTC (permalink / raw)
  To: Clark Sims; +Cc: cygwin

Clark Sims wrote:

> 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.

You need to consult the GCC and GLD manuals.  There are some online at www.gnu.org or www.objsw.com.

The linker generates the map file and there are two options.  -M outputs to standard output and -Map <file> outputs to a file.

try these:
$ ld prog.o -M > prog.map
$ ld prog.o -Map prog.map
$ gcc prog.c -Wl,-M > prog.map (I'm not sure if this is will work)
$ gcc prog.c -Wl,-Map,prog.map

$ gcc prog.c -Map prog.map might work as I think gcc passes any unknown command line options to the linker.  If not, then you have to
use -Wl if using gcc to link.

Brendan Simon.


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to generate map file.
  1999-09-23  0:45 ` Mumit Khan
@ 1999-09-30 23:42   ` Mumit Khan
  0 siblings, 0 replies; 6+ messages in thread
From: Mumit Khan @ 1999-09-30 23:42 UTC (permalink / raw)
  To:  Clark Sims ; +Cc: cygwin

" 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1999-09-30 23:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-22 17:44 How to generate map file  Clark Sims 
1999-09-22 18:18 ` Brendan Simon
1999-09-30 23:42   ` Brendan Simon
1999-09-23  0:45 ` Mumit Khan
1999-09-30 23:42   ` Mumit Khan
1999-09-30 23:42 `  Clark Sims 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).