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.
Questions tagged [objdump]
477 questions
12
votes
3 answers
Extract detailed symbol information (struct members) from elf file compiled with ARM-GCC
I’m using ARM-GCC 4.7.4 to compile Code for a Cortex-M4. For our Debug tool I need knowledge about names, types and addresses of all variables in human readable format (e.g. .txt). The map file provides most of the information, unfortunately not for…

innout
- 121
- 1
- 1
- 5
12
votes
2 answers
What does ".hidden" mean in the output of output objdump -t?
Example:
$ objdump Logger.cpp.o -t
00000000 g F .text 00000000 .hidden __sti___10_Logger_cpp_0b2ae32b

MBober
- 1,095
- 9
- 25
12
votes
2 answers
Flags in objdump output of object file
There is this output of objdump on some object file:
$ 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
…

scdmb
- 15,091
- 21
- 85
- 128
11
votes
1 answer
The difference between mov and movl instruction in X86? and I meet some trouble when reading assembly
Recently, I read some books about computer science. I wrote some C code, and disassembled them, using gcc and objdump.
The following C code:
#include
#include
int dojob()
{
static short num[ ][4] = { {2, 9, -1, 5}, {3,…

Ding Xin
- 307
- 1
- 3
- 11
11
votes
3 answers
Building a Control-flow Graph using results from Objdump
I'm attempting to build a control-flow graph of the assembly results that are returned via a call to objdump -d . Currently the best method I've come up with is to put each line of the result into a linked list, and separate out the memory address,…

Sam
- 278
- 3
- 9
11
votes
3 answers
Disassemble raw x64 machine code
What is the right architecture to get objdump to disassemble raw x64 code? You would think -m x86-64 should work from reading the help, but it doesn't. I tried with both the cygwin64 version:
$ objdump --version
GNU objdump (GNU Binutils)…

Voo
- 29,040
- 11
- 82
- 156
10
votes
2 answers
objdump and ARM vs Thumb
I'm trying to disassemble an object built for ARM with gcc. Unfortunately, objdump is trying to guess whether the code is ARM and Thumb, and is getting it wrong: it thinks my code is Thumb when it's actually ARM.
I see that objdump has an option to…

David Given
- 13,277
- 9
- 76
- 123
10
votes
3 answers
How to know which library a specific function is defined in?
[root@xxx memcached-1.4.5]# objdump -R memcached-debug |grep freeaddrinfo
0000000000629e10 R_X86_64_JUMP_SLOT freeaddrinfo
...
(gdb) disas freeaddrinfo
Dump of assembler code for function freeaddrinfo:
0x00000037aa4baf10 : push …

compiler
- 4,143
- 9
- 36
- 40
10
votes
1 answer
Segfault: and the disassembly is different between objdump and gdb
[Deep breath.]
We have an application that pops up a window using WxMotif 2.6.3 (the GUI library was not - and is not - my choice).
It runs fine on the 32-bit ix86 systems. I had the task of converting it to a 64-bit application. It always…

John
- 2,326
- 1
- 19
- 25
10
votes
2 answers
Why is there information missing in objdump?
I can't manage to find out why there are sometime some .words missing in my assembly code when I run objdump. What do the "..." alone on a line represent?

watiss
- 111
- 1
- 6
9
votes
1 answer
objdump and resolving linkage of local function calls?
If I run objdump -d on a (linux amd64) .o file, function calls show up without the link time resolution done. Example:
90: 66 89 44 24 1c mov %ax,0x1c(%rsp)
95: 44 89 74 24 10 mov %r14d,0x10(%rsp)
9a: e8 00 00 00…

Peeter Joot
- 7,848
- 7
- 48
- 82
9
votes
5 answers
Why do I get incorrect results "ffff..." when inspecting the bytes that make up a compiled function stored in memory?
I've been delving deeper into Linux and C, and I'm curious how functions are stored in memory.
I have the following function:
void test(){
printf( "test\n" );
}
Simple enough. When I run objdump on the executable that has this function, I get…

Neil
- 466
- 1
- 6
- 15
8
votes
2 answers
Ambiguous behaviour of .bss segment in C program
I wrote the simple C program (test.c) below:-
#include
int main()
{
return 0;
}
and executed the follwing to understand size changes in .bss segment.
gcc test.c -o test
size test
The output came out as:-
text data bss dec…

Maharshi Roy
- 358
- 2
- 11
8
votes
1 answer
What does data16 mean in objdump output?
Using the objdump command:
$ objdump -M att -d wrapping_counters_test
I produced this listing (this is just a snippet from the entire listing):
100000ae5: 31 ed xor %ebp,%ebp
100000ae7: 31 d2 xor …

Doug Richardson
- 10,483
- 6
- 51
- 77
7
votes
3 answers
How do I disassemble raw MIPS code?
Similarly to How do I disassemble raw x86 code?, but then for the MIPS architecture: how do I disassemble raw MIPS code with objdump? I want to check the instructions in a vmlinux image, but to do so I now have to:
: > x.c
mipsel-linux-gnu-gcc -c -o…

Lekensteyn
- 64,486
- 22
- 159
- 192