您想要找出给定共享对象中机器指令的大小吗?你为什么需要地图文件?
这给出了.text部分的大小..text部分是存储可执行代码的地方:
$ objdump -x /usr/bin/objdump | grep .text 13 .text 0002c218 0000000000403320 0000000000403320 00003320 2**4
In this example, there are 2c218 bytes of executable text. In decimal this is about 180 KiB:
$ printf %d\\n 0x2c218 180760
Edit: This is how it looks like with a library:
$ objdump -x /usr/lib/libcairo.so | grep .text 11 .text 00054c18 000000000000cc80 000000000000cc80 0000cc80 2**4 $ printf %d\\n 0x54c18 347160