Questions tagged [objdump]

objdump is a program for displaying various information about object files. For instance, it can be used as a disassembler to view executable in assembly form. It is part of the GNU Binutils for fine-grained control over executable and other binary data.

477 questions
6
votes
2 answers

Can't find .dtors and .ctors in binary

I am reading the book Hacking, the art of exploitation. In the book there is a section that explain the use of .dtors and .ctors. I'm trying to reproduce one of the exercises of the book but in my executable I do not have this sections. At first I…
Alejandro Alcalde
  • 5,990
  • 6
  • 39
  • 79
6
votes
3 answers

How to disassemble movb instruction

I am writing a disassembler and I was reviewing the instruction format (and doing some disassembling by hand) and I ran into an instruction that I can't seem to be able to decode. The output for that particular instruction (from objdump) is: c6 05…
karurosu
  • 98
  • 1
  • 5
6
votes
2 answers

Disassembly library used by objdump

I am searching for a library which performs disassembly of a binary code. I found that that libdisasm performs exactly same task as I want. However, I have found some links indicating that libdisasm does not work for 64-bit executables. Is it…
user1129237
6
votes
1 answer

Self modifying code, copy/jump in the heap failed

First I am sorry about the length of this post, but I wanted to explain the problem clearly. I try to write a kind of small self modifying program in C but I have some troubles and I don't know exactly why. Plateform is : Ubuntu/Linux 2.6.32-40…
hodj
  • 73
  • 3
5
votes
2 answers

Trying to assemble the output of an disassembler (such as objdump)

Possible Duplicate: Disassembling, modifying and then reassembling a Linux executable I've been told that assembly and dissassembly are not inverses. Apparently, you can't dissassemble a program, put that output directly into an assembler, and…
matzahboy
  • 3,004
  • 20
  • 25
5
votes
1 answer

objdump produces wrong branch opcode interpretation

See the following objdump line of a specific object file of a specific function (func): 3c: e03a b.n 78 Now, the opcode e03a in the target system (ARMv6-M) says jump to the location of PC + 0x78. A correct…
izac89
  • 3,790
  • 7
  • 30
  • 46
5
votes
5 answers

compare two binary files

How do I diff two binary files? I have two versions of a program, version 1 and version 2. I've made a small number of changes between the two version, but unfortunately haven't been backing up regularly, and so although I've got the source for…
Benubird
  • 18,551
  • 27
  • 90
  • 141
5
votes
1 answer

How do GNU assembler x86 instruction suffixes like ".s" in "mov.s" work?

GNU assembler appears to have some means of controlling the alternative forms of the opcode being emitted for some instructions. E.g. .intel_syntax noprefix mov eax, ecx mov.s eax, ecx Processing the above code with as test.s -o test.o && objdump…
Ruslan
  • 18,162
  • 8
  • 67
  • 136
5
votes
2 answers

objdump ELF and Windows

I am fairly new to this subject, that is ELF and any Linux related stuff. I am trying to write an ELF file and would prefer to do it on WinXP. My question is, can this be done with MS Visual Studio including the compilation? As far as my…
jacib
  • 55
  • 1
  • 6
5
votes
0 answers

Can objdump use bss variable names in text section?

I am using objdump to generate the disassembly of C code and wondering if there is a way to get the names of variables from the heap (.bss section) to be used in the .text section disassembly, rather than the hex addresses. For example, int…
5
votes
2 answers

How to extract function prototypes from an elf file?

I have not been successful in finding an answer on this question. Using GDB, I can use the command "call" to get the prototype of a function. Example: (gdb) call fn $1 = {void (int, int)} 0x8048414 So, GDB is able to figure out, only from the…
Blue Demon
  • 293
  • 3
  • 12
5
votes
2 answers

meaning of objdump -d output assembly

I'm trying to figure out what all of the elements of this objdump -d mean. for example i have: 08048b50 : 8048b50: 83 ec 1c sub $0x1c,%esp 8048b53: c7 44 24 04 68 a2 04 movl $0x804a268,0x4(%esp) 8048b5a: 08 …
Ted
  • 487
  • 2
  • 12
  • 23
5
votes
1 answer

What does an "Algn" of 2**2 and 2**0 mean in the output of objdump?

What does this mean in below file? 2**2 and 2**0 $ objdump -h main.o main.o: file format elf32-i386 Sections: Idx Name Size VMA LMA File off Algn 0 .text 0000000b 00000000 00000000 00000034 2**2 …
qcmao
  • 61
  • 4
5
votes
2 answers

How to make objdump show assembly of sections only appeared in source code?

I would like to produce assemblies like the one in the answer of this question Using GCC to produce readable assembly? for simple test code: test.c void main(){ int i; for(i=0;i<10;i++){ printf("%d\n",i); } } gcc command : gcc -g…
JerseyGood
  • 191
  • 4
  • 15
5
votes
2 answers

What is the equivalent command for objdump in IBM AIX

I am not able to find objdump command in IBM AIX 5.1 machine. Actually I want to get the assembly instructions (disassemble) from a library generated in AIX. Linux has objdump command and solaris dis command to do this. What is the equivalent…
rashok
  • 12,790
  • 16
  • 88
  • 100