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

GCC debugging options not respecting preprocessor #if when viewed with objdump

When I run gcc with the -g option, this enables me to see some c code when I run the executable with objdump. I have a program that has a sections of code in #if blocks. When I run gcc with -g and run objdump it displays c code from the #ifs that…
Dave_Peachy
  • 498
  • 3
  • 12
0
votes
1 answer

Default settings for objdump?

So I'm still new to disassembling and I've got a couple of problems that would help being taken care of. I'm following along the book "Art of Exploitation". The author prefers using Intel syntax in 32bit mode when he objdumps and since I want to…
coffeeFlow
  • 179
  • 1
  • 6
0
votes
0 answers

Get target code using OBJDUMP

How to annotate fragments of target code with the source statements that they correspond to using OBJDUMP in linux.
0
votes
1 answer

How to find an external function definition

I am compiling a big project. This project is using shared libraries, especially lapack ones. I would want to be sure, for a given function, in which shared library the system finds it. Here the nm output: $ nm -DC ~/bin/app | grep potrf …
Jérôme
  • 2,640
  • 3
  • 26
  • 39
0
votes
1 answer

Differences between objdump and xxd

I am trying to find a call function in a binary file, so I tried this: Compile my code (in C), Use the command: mips-mti-linux-gnu-objdump -d myapp.elf> objdump.txt My function in objdump.txt file: 9d003350: 42000828 myfunction 0x1 Now, I want to…
Matheus
  • 3
  • 1
  • 3
0
votes
1 answer

How to turn hex code into x86 instructions

I'm trying to make a script or program that will take given bytes (given in hexadecimal), and convert them into a x86 instructions (For example c3 -> retq) I've tried doing it by calling gcc -c on an assembly file just containing retq retq and then…
Testare
  • 338
  • 3
  • 12
0
votes
1 answer

pyelftools: retrieve section flags like objdump does for an elf32-littlearm binary

I need to identify all ELF sections that have the LOAD flag in my python script; using objdump, I receive $ arm-none-eabi-objdump -h test.elf test.elf: file format elf32-littlearm Sections: Idx Name Size VMA LMA File…
mic_e
  • 5,594
  • 4
  • 34
  • 49
0
votes
1 answer

Is it possible to display information about the size of each local variable?

I want to find out if any too big non-static local variables are declared and used by some software developer in our team. Are there any GCC options and/or objdump parameters or something to produce and show information about local variables and…
xiaokaoy
  • 1,608
  • 3
  • 15
  • 27
0
votes
0 answers

Why compilation phase doesn't see function name, but link phase sees names?

My understanding was: (1) In compilation phase ,gcc -c will make every external function call to have a name as place holder,like 'call strlen', 'call write'. (2) In linking phase, gcc know the real address of 'strlen' and 'write' functions, so it…
Troskyvs
  • 7,537
  • 7
  • 47
  • 115
0
votes
0 answers

Find driver modules used by my application

I want to know all the driver modules used by my running application. Is there any way to check this.? Something like objdump used to find dependent libraries / binaries.
deeps8us
  • 75
  • 1
  • 9
0
votes
1 answer

objdump --dwarf of assembly code does not list function

I wrote simple x86 assembly routine: $ cat asm.s .global foo .section .text foo: nop ret And compiled it with $ gcc -c -g asm.s -o asm.o But when I do objdump --dwarf asm.o, it does not display any info about function foo. Looks like,…
Ravi
  • 1,574
  • 2
  • 16
  • 28
0
votes
3 answers

How to view the section layout info recorded in an ELF file?

Suppose the following linker script is used to layout an executable file. SECTIONS { . = 0x10000; .text : { *(.text) } .data : { *(.data) } .bss : { *(.bss) } } OUTPUT_FORMAT(ELF) My questions are: I think such layout info must be stored in the…
smwikipedia
  • 61,609
  • 92
  • 309
  • 482
0
votes
1 answer

Proprietary ARM ELF binary

Recently, I got my hands on a ELF executable intended for ARM-based microcontrollers. To my surprise, when I tried to inspect it by dumping everything with arm-none-eabi-objdump it kept failing with error File format not recognized Upon asking…
user6296837
0
votes
2 answers

components of a symbol name in objdump output

I'm trying to use objdump to compare two different versions of a binary file and was wondering if anyone knew how to interpret the symbol name from the following line of my objdump output: 102b33bc l O .rodata 00000058…
user8287
  • 1
  • 1
0
votes
0 answers

Understanding what objdump disassembly is telling me

I'm debugging a problem in a driver I'm writing. The kernel core files I have for this show a problem in uart_remove_one_port which is a function in the serial_core.c (i.e. part of the kernel). I ran objdump -d -S on the vmlinux file for the…
Andrew Falanga
  • 2,274
  • 4
  • 26
  • 51