Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   Map File (http://www.programmingforums.org/showthread.php?t=12460)

shouvik Jan 30th, 2007 1:35 AM

Map File
 
how to generate a map file in GCC.
please help

Infinite Recursion Jan 30th, 2007 9:24 AM

I am under the impression that English is not your native language.
Here is something found when I used -google- with "gcc mapfile" as keywords.

"Map file is generally generated by linker. This specifies
the memory map generated by linker. Generally map file
does not have any specific format such as coff or elf ..
It is a human readable file and the contents of this
file are linker dependent.
This file contains memory addresses and sizes of varios
sections, section types(e.g. noload section etc). "

shouvik Jan 30th, 2007 9:29 AM

Quote:

I am under the impression that English is not your native language.
well if you presume things at once you might go wrong as well.

I did a li'l bit of homework before putting up this question here and I did get my map file generated. But unlike VC it contained no mangled name info as i required which icould only extract through the object file.

v0id Jan 31st, 2007 1:27 AM

You've to use the parameter, -Wl, to direct the -Wl's arguments to the linker (ld). Then just use the simple -Map and then a filename for the mapfile.
:

gcc test.c -o test -Wl,-Map,testMap.map
I hope it was what you needed!

shouvik Jan 31st, 2007 1:30 AM

yeah exactly that's what i used. But i needed them name mangles which were missing in the map file


All times are GMT -5. The time now is 1:48 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC