gcc - how to create a mapfile of the object file

后端 未结 1 1246
旧时难觅i
旧时难觅i 2020-11-30 12:30

I have a .map file called a.out.map that was created from a .cpp/.obj file but I don\'t remember how. I\'ve included a sn

相关标签:
1条回答
  • 2020-11-30 13:17

    If you are linking the program and want to generate map output add:

     -Xlinker -Map=output.map 
    

    to the gcc command in order to make it create the map file output.map

    If you want to see the symbols and relocation of an object file, you can use the objdump tool:

    objdump -x an_object_file.o
    
    0 讨论(0)
提交回复
热议问题