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
1 answer
instruction repeated twice when decoded into machine language,
Am basically learning how to make my own instruction in the X86 architecture, but to do that I am understanding how they are decoded and and interpreted to a low level language,
By taking an example of a simple mov instruction and using the .byte…

Weez Khan
- 137
- 1
- 8
0
votes
1 answer
API for ldd (or objdump)?
I need to programmatically inspect the library dependencies of a given executable. Is there a better way than running the ldd (or objdump) commands and parsing their output? Is there an API available which gives the same results as ldd ?

Saurabh Nanda
- 6,373
- 5
- 31
- 60
0
votes
1 answer
Get the full contents of any section of an ELF file in C code
I want to get the full contents of any sections in an ELF file,
I can get the name of the content with this code:
int fd;
int counter;
int filesize;
void *data;
char *strtab;
Elf64_Ehdr *elf;
Elf64_Shdr *shdr;
counter = 0;
fd = open(av[1],…

Laodis
- 17
- 5
0
votes
1 answer
Is it possible to make a hardcoding with the help of the command objcopy
I'm working on Linux and I've just heard that there was a command objcopy, I've found the relative command on my x86_64 PC: x86_64-linux-gnu-objcopy.
With its help, I can convert a file into an obj file: x86_64-linux-gnu-objcopy -I binary -O…

Yves
- 11,597
- 17
- 83
- 180
0
votes
2 answers
How should the disassembly mode be chosen for bootloader code?
Lets say I have a bootloader assembly code to debug which uses .code16 and .code32 to define codes for different mode of the CPU it is running in. The architecture for which this bootloader is meant is 64-bit (x86) CPU.
Now what mode should be used…

Naveen
- 7,944
- 12
- 78
- 165
0
votes
0 answers
x86-64 objdump vs pmap addresses
#include
int main() {
printf("text at %p\n", main);
int c = getchar();
}
Compiling the above code on VirtualBox Ubuntu 64 bit and running it, I get:
text at 0x55555555468a
pmap:
0000555555554000 4K r-x--…

pie
- 1
- 3
0
votes
1 answer
How to extract shared library version from SONAME field?
There is a shared library say, libsample.so & libsample.so.abc.xy (a,b,c,x and y are 0-9), former having soft link to latter.
How to extract "abc.xy" field from SONAME section of libsample.so?
I have tried below command :
$ objdump -p libsample.so…

psy
- 181
- 1
- 8
0
votes
0 answers
Reverse engineering assembly
Good day. I am struggling to figure out what the following assembly code does. The code is from objdump. To give it some background, a random "string" is generated (for example "68 7"). Before all this code the program does something recursively,…

Rikus Strydom
- 13
- 3
0
votes
1 answer
Is there a way to filter out ONLY assembly code from disassembler output?
The closest I could get to answering my own question here is with this long chain of pipes through grep, sed, cut, tr, grep, and back again (in this example “bash” could be replaced with anything):
objdump --no-show-raw-insn -Matt,att-mnemonic -Dz…

realkstrawn93
- 722
- 1
- 6
- 13
0
votes
2 answers
x86 equivalent of a WebAssembly Instruction
I have been playing around with a WebAssembly program . I wanted to get the x86 equivalent of the WebAssembly program . By googling I found that objdump can be used for doing so for any object file using the command
objdump -M intel…

Apoorv Jain
- 113
- 9
0
votes
0 answers
Objdump Address representation
I recently tried my hands on Objdump of a c object file . For each instruction there was an address associated with it. I tried searching the web for what this address represents and found out that the address was basically the address of the…

Apoorv Jain
- 113
- 9
0
votes
1 answer
Integer within C binary: viewing it using readelf, objdump or similar
I have the following C source file, hello.c, compiled on linux via g++ -o hello hello.c:
#include
const char* p = "Hello world";
const long nn = 0xDEADBEEF;
int main()
{
printf("%s %ld", p, nn);
return -1;
}
(Yes I know…

Wad
- 1,454
- 1
- 16
- 33
0
votes
1 answer
Getting only hexa decimal byte values from the disassembly of a compiled library
I have used objdump to disassemble all the functions in a compiled library file and written the output to a text file. In the text file the output of function called clear_bit is as follows.
Disassembly of section…

hEShaN
- 551
- 1
- 9
- 27
0
votes
0 answers
What is advantage of objdump in programming?
I am learning about objdump and know basic about it.
Objdump displays information about one or more object files.
Some people told me that we can using objdump to debug memory corruption, avoid global variable buffer overflow, optimize code ...…

T1412
- 705
- 1
- 5
- 12
0
votes
1 answer
addr2line with archive files
I am trying to use addr2line with a archive file libdpdk.a
I have a backtrace:
backtrace returned: 7
0: 0x46fd05 ./build/ip_pipeline(bt+0x25) [0x46fd05]
1: 0x42a163 ./build/ip_pipeline() [0x42a163]
2: 0x46ff21 ./build/ip_pipeline(rte_eal_init+0x171)…

Haswell
- 1,573
- 1
- 18
- 45