Tu banner alternativo

Objdump

Today, Objdump is a topic that has acquired great relevance in various areas of society. From politics to popular culture, Objdump has become a constant point of discussion and a source of inspiration for many people. Over time, Objdump has grown in importance and has had a significant impact on the way people interact with each other. This article aims to explore in detail the impact of Objdump on today's society and examine how it has evolved over time. Likewise, the different perspectives and opinions that exist around Objdump will be analyzed, with the aim of providing a comprehensive vision of this very relevant topic.

Tu banner alternativo
objdump
Operating systemUnix and Unix-like
TypeCommand
LicenseGNU GPL

objdump is a command-line program for displaying various information about object files on Unix-like operating systems. For instance, it can be used as a disassembler to view an executable in assembly form. It is part of the GNU Binutils for fine-grained control over executables and other binary data. objdump uses the BFD library to read the contents of object files. Similar utilities are Borland TDUMP, Microsoft DUMPBIN and readelf.

On certain platforms (e.g. macOS), the objdump binary may actually be a link to LLVM's objdump, with different command-line options and behavior.[citation needed] otool and nm perform analogous functions for Mach-O files.[1][2]

Example

For example,

$ objdump -D -M intel file.bin

This disassembles the file file.bin, showing its assembly code in Intel syntax.

Example output:

  4004ed	<main>:
  4004ed:	55                   	push   rbp
  4004ee:	48 89 e5             	mov    rbp,rsp
  4004f1:	c7 45 ec 00 00 00 00 	mov    DWORD PTR ,0x0
  4004f8:	c7 45 f0 01 00 00 00 	mov    DWORD PTR ,0x1
  4004ff:	c7 45 f4 02 00 00 00 	mov    DWORD PTR ,0x2
  400506:	c7 45 f8 03 00 00 00 	mov    DWORD PTR ,0x3
  40050d:	c7 45 fc 04 00 00 00 	mov    DWORD PTR ,0x4
  400514:	c7 45 ec 00 00 00 00 	mov    DWORD PTR ,0x0
  40051b:	eb 13                	jmp    400530 <main+0x43>
  40051d:	8b 05 15 0b 20 00    	mov    eax,DWORD PTR         # 601038 <globalA>
  400523:	83 e8 01             	sub    eax,0x1
  400526:	89 05 0c 0b 20 00    	mov    DWORD PTR ,eax        # 601038 <globalA>
  40052c:	83 45 ec 01          	add    DWORD PTR ,0x1
  400530:	8b 05 02 0b 20 00    	mov    eax,DWORD PTR         # 601038 <globalA>
  400536:	39 45 ec             	cmp    DWORD PTR ,eax
  400539:	7c e2                	jl     40051d <main+0x30>
  40053b:	5d                   	pop    rbp
  40053c:	c3                   	ret

See also

References

  1. ^ "An Apple Library Primer". Apple Developer Forums.
  2. ^ "llvm-otool - Mach-O dumping tool". LLVM Reference.