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
0
votes
0 answers
Relocation R_X86_64_PC32: why value is x-4 instead of x?
Consider this code:
int arr[4];
void foo(void)
{
arr[0] = arr[1];
}
compiled and objdumped as:
gcc t57.c -O3 -c && objdump -Dr t57.o
leading to:
0000000000000000 :
0: f3 0f 1e fa endbr64
4: 8b 05 00 00 00 00 …

pmor
- 5,392
- 4
- 17
- 36
0
votes
0 answers
`as` + objdump skips custom section when assembling + disassembling
I have the following file:
test.s
.section a_random_section
label_number1:
jmp label_number1
and after executing as -o test.o test.s && objdump -d test.o I'm getting the following output:
test.o: file format elf64-x86-64
but I'd expect…

TornaxO7
- 1,150
- 9
- 24
0
votes
0 answers
Finding pointer address using objdump - C
I'm trying to find the pointer's memory address of a global variable on my C program.
It looks something like that:
int target;
int main(){
return 0;
}
I tried to use objdump -t on the binary code and I got got:
0000000000004014 g O .bss …

Y_Z
- 71
- 6
0
votes
0 answers
MSYS2+MinGW64: why do ldd and objdump find different DLL dependencies?
I get different DLLs dependencies reported by different tools and like to deeply understand why. So answers like "tool xxx is crap, use cool yyy" are opinions and not welcome. Answers like "you have wrong path order" or "you missed to export…

daisy reiss-zahn
- 1
- 1
0
votes
1 answer
RISC-V: How to fix "file format not recognized" when disassembling a .img file?
I'm playing with RISC-V.
I have a .img file and I want to disassemble it into a .asm file, so I ran the following command:
> riscv64-unknown-elf-objdump -d xxx.img > xxx.asm
However, I got this issue:
riscv64-unknown-elf-objdump: xxx.img: file…
0
votes
0 answers
objdump giving no output
Does objdump require some information embedded in an executable that may be stripped by a compiler or something? I tried using it on an executable on Linux and this is the only output I get
objdump -D foo
foo: file format elf64-x86-64

Liam Clink
- 189
- 1
- 11
0
votes
0 answers
Mapping C/C++ source code to assembly code similar to godbolt
Our Android application has lot of code written in C/C++ and whenever a crash is reported from production users we get to know the callstack along with the registers state at the time of crash. When the crash doesn't look so evident, registers state…

Pendyala
- 585
- 1
- 6
- 17
0
votes
0 answers
Objdump and gdb shows different addresses
I am debugging using objdump and gdb, but they show different addresses, which makes debugging difficult! Is it possible to get the same addresses somehow?

user3488903
- 131
- 4
0
votes
1 answer
Comparing Object Files with ObjDump
So I am trying to compare two ELF files original/gen_twiddle_fft16x16_imre.oe674 and new/gen_twiddle_fft16x16_imre.oe674 to see if they are the same thing. I have a hunch that they are, but, I can't tell exactly.
I can't just compare the code size…

The Dude
- 661
- 2
- 11
- 20
0
votes
1 answer
Problems reverse engineering cpp / asm code (just for the sake of learning)
I am trying some cpp binary disassembling. I wrote this utterly simple code:
#include
int main() {
int i=0; int i2=0;
for(int i=0; i<1000000; i++) {i2++; std::cout << "\n" << i2;}
return 0;
}
I then compiled it with g++…

tmm88
- 17
- 2
0
votes
1 answer
objdump -t columns meaning
[ 4](sec 3)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .bss
[ 6](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 fred
the number inside the square brackets is the number of the entry in the symbol table, the sec number is the section…

shiyon sufa
- 179
- 3
- 7
0
votes
1 answer
Weird behavior when dereferencing pointer that points to the address of an instruction
I'm doing some reverse engineering on a ELF 32-Bit executable.
Here is the code of the .text section :
08048080 <.text>:
8048080: b8 04 00 00 00 mov eax,0x4
8048085: bb 01 00 00 00 mov ebx,0x1
804808a: b9 a1 91 04…

Rémi Hoarau
- 11
- 1
0
votes
0 answers
How to detect instructions that access the same memory location from assembly/objdump?
Is there any static tool to analyze assembly/objdump and detect instructions that access the same memory location?
For instance, consider the following C code, where functions main and f access the same object on heap pointed to by the heapobj…

Farzam
- 131
- 2
- 13
0
votes
2 answers
Is there an easy way to tell which C++ classes are abstract from a shared object library?
I'm currently writing a library that has some abstract classes. In addition to checking that the library compiles, I'd like to make sure that all pure virtual methods have been defined in classes that are intended to be concrete. I had hoped that…

sasquires
- 356
- 3
- 15
0
votes
1 answer
ELF's gnu_debuglink section gives me weird name
I've used Ubuntu 20.04.3, and when I run
readelf --string-dump=.gnu_debuglink /usr/bin/cp
I got weird debug filename while expecting something like cp.debug
String dump of section '.gnu_debuglink':
[ 0] …

user150497
- 490
- 4
- 14