I use some third-party libraries in a project. This project is a embedded system with a MIPS(isa32r2) core. Recently we found a bug in the third-party library(libusb.a), but because of the time there is no technical support anymore. so I try to disassemble the libarary.
$ mips-sde-elf-ar -x libusb.a $ mips-sde-elf-objdump.exe -Ds -mmips:isa32r2 -EL usbhost_func.o > usbhost_func.s
in file usbhost_func.s I can get some info like:
Disassembly of section .text.usbhost_init: 00000000 : 0: 27bdffd8 addiu sp,sp,-40 4: 3c020000 lui v0,0x0
looks like a complete disassembly functions of . 看起来像 的完整反汇编函数。 but there is some other info here like:
Disassembly of section .pdr: 00000000 : 0: 00000000 nop 4: 40000000 mfc0 zero,c0_index 8: fffffffc sdc3 $31,-4(ra) ... 14: 00000008 jr zero 18: 0000001e 0x1e 1c: 0000001f 0x1f 20: 00000000 nop Disassembly of section .gnu.attributes: 00000000 : 0: 00000f41 0xf41 4: 756e6700 jalx 5b99c00 8: 00070100 sll zero,a3,0x4 c: 03040000 0x3040000
so my question is:
- What does the secton's mean like ? ?
- Why there is some in ? 在 ?
- What is the srart point to disassemble a mips library?
Any hint and info are welcome.Tks.
objdump -D
will try to deassemble all sections instead of sections which include valid instructions, you should use objdump -d
.
.pdr
is a debug information section, may not include valid instructions.
For static libraries (.a files), you should extract the object files in these libraries by ar x libfoo.a
, and try to deassemble those object files you got by objdump -d
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.