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
5
votes
1 answer

Why do common section variables only show up in object file not the executable?

I'm trying to understand more about the "common" section of an executable and I noticed that when doing an objdump on compiled code, I can see variables placed in the common code only on object files (*.o) not on executables. Why is…
Mike
  • 47,263
  • 29
  • 113
  • 177
5
votes
3 answers

Correlate Source with Assembly Listing of a C++ Program

Analyzing Core Dump in retail build often requires to correlate the objdump of any specific module and the source. Normally correlating the assembly dump with the source becomes a pain if the function is quite involved. Today I tried to create an…
Abhijit
  • 62,056
  • 18
  • 131
  • 204
4
votes
1 answer

gcc/objdump output containing lines from C source code among the lines of disassembled ASM code

I believe this question is significantly different from other, similar questions. My flow is roughly this: ### Compile %> gcc -ggdb3 file0.c ... -fno-builtin -c -o file0.o %> gcc -ggdb3 file1.c ... -fno-builtin -c -o file1.o ... %> gcc -ggdb3…
Lance E.T. Compte
  • 932
  • 1
  • 11
  • 33
4
votes
0 answers

Sections of a disassembled x86 elf executable and when and in which order they are run

I'm learning currently x86 assembly and trying some reverse engineering on a regular x86 elf executable. Now there are multiple sections like init main etc. I did a bit google research but didn't find quit what I wanted. Maybe somebody here knows…
rob
  • 345
  • 1
  • 5
  • 13
4
votes
0 answers

How to understand .bss section disassemble code?

Source C code: static int b; Corresponding .bss section disassemble code in object file: Disassembly of section .bss: 00000000 : 0: 00 00 add %al,(%eax) 2: 00 00 add %al,(%eax) Based on the…
Edee
  • 1,746
  • 2
  • 6
  • 14
4
votes
1 answer

How to get an objdump without NUL bytes?

I have this code in assembly: global _start section .rodata hello: db "Hello World!", 10 section .text _start: mov eax,4 mov ebx,1 mov ecx,hello mov edx,13 int 80h ;…
srccode
  • 721
  • 4
  • 16
4
votes
2 answers

Given program counter, find the source line in a shared library

I'm trying to debug a segfault in Android's surfaceflinger daemon on a custom made ARM board. The process crashes before dumping the call stack and register content, including the program counter. Normally I would've used objdump and searched for…
Einheri
  • 957
  • 1
  • 9
  • 22
4
votes
1 answer

Understanding disassembled binary from Objdump - What are the fields from the output

I get the following output when I disassembled a simple ARM binary file using the command "arm-linux-gnueabihf-objdump -d a.out" 00008480 <_start>: 8480: f04f 0b00 mov.w fp, #0 8484: f04f 0e00 mov.w lr, #0 8488: bc02 pop…
Dragonight
  • 1,033
  • 2
  • 10
  • 20
4
votes
0 answers

objdump with nodejs script that throws segmentation error

I have nodejs script that throws Error: Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) After I included var SegfaultHandler = require('segfault-handler'); SegfaultHandler.registerHandler("crash.log"); // With no…
Tree
  • 29,135
  • 24
  • 78
  • 98
4
votes
1 answer

node js script crashes: Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

My script crashes and debugger is unable to catch the error. I even tried to try catch some functions but it didnt work. Any suggestion how to narrow down where the problem could be? The script is a testing script for a game. It works good for…
Tree
  • 29,135
  • 24
  • 78
  • 98
4
votes
1 answer

Link error with LLVM StackMaps from asm/C

I am currently trying to write a basic C stack walker using LLVM's stackmap feature. I have generated the stackmaps and now I am trying to pass the stackmap to a C function so I can work with it. In particular I am having trouble passing in…
AbelianGrape
  • 43
  • 1
  • 4
4
votes
2 answers

How to disable address randomization (ASLR) from an ELF file?

Solved: The solution was calling personality(0x40000). See details below in the comments. Where does the ASLR flag resides within an ELF file? I need to disable ASLR for a specific library (.so). I've tried using objdump but I couldn't find out how…
John
  • 43
  • 1
  • 4
4
votes
1 answer

Printf Symbol Resolution

I'm writing a little program which trace all the syscall and calls of a binary file (elf) using ptrace (singlestep, getregs, pick_text, opcodes comparison, etc). So far I've succeed to trace syscalls and simple calls like user defined functions. But…
Thibaud Auzou
  • 129
  • 10
4
votes
1 answer

defining code offset for objdump disassembler in ARMv8

I have a file containing ARM v8 binary code. I want to disassemble the file and get the actual assembly code contained in it. Assuming the file name is tmp.o I run: /opt/linaro/A64-tools/bin/aarch64-linux-gnu-objdump -b binary -m AARCH64 -D…
siwesam
  • 463
  • 5
  • 8
4
votes
1 answer

Linux ELF file: How to get the shared object belonging to an imported function

Given a dynamically linked ELF binary, say for example /bin/less. Inside the binary, there is a call to a function provided by a shared library, for example strcpy() How can I find out from which shared library/shared object the strcp function is…
langlauf.io
  • 3,009
  • 2
  • 28
  • 45