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
2
votes
1 answer
Need help compiling .c file into shellcode
I have a piece of code like this:
#include
int main()
{
char z[100] = "Hello world";
printf("%s", z);
getchar();
}
I then compiled it using gcc -S file.c
Then I turned into a object file using: gcc -c file.S -o file.o
Then I…

Agent Magma
- 41
- 1
- 7
2
votes
1 answer
Why does the assembly encoding of objdump vary?
I was reading this article about Position Independent Code and I encountered this assembly listing of a function.
0000043c :
43c: 55 push ebp
43d: 89 e5 mov ebp,esp
43f: e8 16 00 00 00 …

shpark
- 369
- 2
- 7
2
votes
1 answer
x86 assembly - Encoding a relative jmp
I'm a bit confused by how gcc encodes relative jumps. I have the following:
int main(void)
{
__asm__ __volatile__(
"jmp label\n"
"label:\n"
"nop\n"
);
return 0;
}
Building this (gcc -c -o test.o test.c) shows…

Martin
- 940
- 6
- 26
2
votes
2 answers
objdump adjust vma offset in gnu Utilities
in The gnu Binary Utilities they say
objdump --adjust-vma=offset
When dumping information, first add offset to all the section addresses. This
is useful if the section addresses do not correspond to the symbol table, which
can happen when…
user9483419
2
votes
1 answer
Is there a way to format objdump output?
Examining some binary files with objdump (i'm on a mac, but installed binutils).
Is there a way to align the columns so there is no column overflow? Posted some example output below to illustrate the current state of things.
I don't want to send…

seamus
- 2,681
- 7
- 26
- 49
2
votes
2 answers
Why does GCC store global and static int differently?
Here is my C program with one static, two global, one local and one extern variable.
#include
int gvar1;
int gvar2 = 12;
extern int evar = 1;
int main(void)
{
int lvar;
static int svar = 4;
lvar = 2;
gvar1 = 3;
printf…

user3778271
- 89
- 4
2
votes
2 answers
Does assembler code compiled on a 32bit machine differ from code compiled with "gcc -m32"?
I'm learnin about assembler language right now. The code examples in the book I'm learning from are all compiled on a x86 32bit machine (i think) with gcc. To match my outputs with the one from the book i compiled my simple helloworld.c with "gcc…

Kai Baumann
- 67
- 7
2
votes
1 answer
Objdump disassemble doesn't match source code
I'm investigating the execution flow of a OpenMP program linked to libgomp. It uses the #pragma omp parallel for. I already know that this construct becomes, among other things, a call to GOMP_parallel function, which is implemented as…

Márcio Jales
- 205
- 1
- 8
2
votes
1 answer
what does .word's address mean in objdump of my executable object file?
793 00010cfc :
794 10cfc: e92d4800 push {fp, lr}
795 10d00: e28db004 add fp, sp, #4
796 10d04: e24dd008 sub sp, sp, #8
797 10d08: e3a03000 mov r3,…

doosolLee
- 43
- 7
2
votes
2 answers
objdump and objcopy as a c/c++ library
I need to perform objdump on an ELF to get address and/or sizes of specific functions and variables as well objcopy to convert it to a different format for operations performed later. Especially with the first part, some of the operations done on…

J_S
- 2,985
- 3
- 15
- 38
2
votes
1 answer
Disagreement of tools for analyzing .bss section size of ELF file
While analyzing the .bss section of a C++ program compiled as ELF file for the ARM platform, I came across several ways to determine the size. The four ways I tested are also mentioned in the question Tool to analyze size of ELF sections and…

koalo
- 2,113
- 20
- 31
2
votes
1 answer
Objdump doesn't recognize the architecture of a shared library
I built a shared library on Ubuntu 14.04 for ARM platform. The file has compiled and build successfully. I can inspect exported symbols with nm command but when I check .so file header I got the information that architecture is unknown.
Is this…

tommyk
- 3,187
- 7
- 39
- 61
2
votes
1 answer
Assembly instruction addl using byte instead of long
I am at the moment studying the assembly code compiled from simple c programs using objdump, but this confuses me:
4004f1: c7 45 fc 02 00 00 00 movl $0x2,-0x4(%rbp)
4004f8: 83 45 fc 05 addl $0x5,-0x4(%rbp)
Doesn't…

Jontahan
- 113
- 8
2
votes
0 answers
Eclipse CDT ELF Parser unnable to parse debug file
TL;DR
CDT ELF parser and ObjDump cannot parse my relocatable file, but both work properly with Executable File. I wonder if they are related.
ObjDump has wrong abbrev offsets, CDT parser throws BufferUnderflowException
The Problem
I'm working with…

souzaviv
- 21
- 4
2
votes
1 answer
Debug sections after binary is stripped
I built my application(c/c++) on linux and stripped it using "strip" command.
I thought without giving any options it will strip all the debugging info from the original binary.
I stripped using following:
strip my_app -o $odir/my_app_stripped …

Monku
- 2,440
- 4
- 33
- 57