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

When will the .fini_array section being used?

I'm following http://tinyhack.com/2014/03/12/implementing-a-web-server-in-a-single-printf-call/ to write a web server with only printf() call. I am following the guidance of the article. Howerver, I found that the executable file of my program…
amazonsx
  • 71
  • 1
  • 3
4
votes
1 answer

nm,objdump & pfunct giving contradicting answers to check if a function is inlined or not

i have a shared obj file say a.so and in that i want to see if a particular function (say fname) is inlined or not. I tried following 4 ways and getting different answers : 1) nm a.so | grep fname -> this doesn't give any o/p implying that the…
mezda
  • 3,537
  • 6
  • 30
  • 37
4
votes
1 answer

Can gnu utils on Mac such as gobjdump parser Linux ELF binary?

So basically I have some ELF binaries compiled on Linux 32 bit. And I want to analysis it on my Mac 64 bit. I am trying to use the gnu utils installed by homebrew such as gobjdump and greadelf. However, when I tried to parser the elf binaries using…
lllllllllllll
  • 8,519
  • 9
  • 45
  • 80
4
votes
2 answers

debugging with gdb and objdump

I have a number of questions regarding gdb and objdump. Addresses in objdump If I do: objdump -d binary-file-name, then I get output that includes this part: Disassembly of section .text: 080484a0 <_start>: 80484a0: 31 ed xor …
Maricruzz
  • 405
  • 3
  • 7
  • 14
4
votes
1 answer

how to use aarch64-linux-gnu-objdump to disassemble V7 mode instructions (A32,T32)

Im using aarch64-linux-gnu-objdump to disassemble part of a program for ARM v8. It works well for V8 64 bit instructions, but fails when the mode is changed to V7 instruction set(A32) - the code starts as V8 instruction set, switches to A32 (…
WeaselFox
  • 7,220
  • 8
  • 44
  • 75
4
votes
3 answers

DWARF info seem to be wrong for DW_AT_high_pc with gcc 4.8.2

As a newbie to DWARF, I tried the code presented in this page (code is here) but when I launch it I get: $> ./dwarf_get_func_addr tracedprog DW_TAG_subprogram: 'do_stuff' abort() in libdwarf. No error argument, no handler. zsh: abort (core dumped) …
Vincent
  • 430
  • 3
  • 13
4
votes
1 answer

What does *COM* stand for in objdump symbol table?

There are a few section names in objdump output that have some unique names, like *ABS* *COM* *UND* I guess *ABS* stands for ABSolute and denotes a symbol that doesn't belong to any section. External variables go to *COM* section. It seems that…
Farcaller
  • 3,070
  • 1
  • 27
  • 42
4
votes
1 answer

How to list linker allocated code objects w/ gcc?

I am building an embedded application comprised of several code modules and a static library. Some global variables are explicitly placed in dedicated memory sections (i.e, not the default .data section). The processor memory architecture is 4…
ysap
  • 7,723
  • 7
  • 59
  • 122
3
votes
1 answer

Cannot find value in objdump output

I created a dummy program just to take a look at the assembly for research purposes. At the end of the question, you can find both the linker script, the startup file and the makefile, as well as my code. My problem is that in my code, I want to set…
Marcell Juhász
  • 528
  • 3
  • 9
3
votes
1 answer

Discrepancy in outputs of `size` and `objdump`?

I have compiled the following C function (in sum.c) into object code: int sum(int a, int b) { return (a + b); } using gcc -c sum.c When I check the sizes of different sections using size: size sum.o text data bss dec hex…
First User
  • 704
  • 5
  • 12
3
votes
1 answer

why does mov %ax, %ds assemble+disassemble as mov %eax,%ds, inconsistent with the original?

test.S .text .global _start _start: xor %ax, %ax mov %ax, %ds mov %ax, %ss mov %ax, %es mov %ax, %fs mov %ax, %gs I got the disassembly code file by doing this $ x86_64-elf-gcc -g -c -O0 -m32…
3
votes
1 answer

Convolution Function Latency Bottleneck

I have implemented a Convolutional Neural Network in C and have been studying what parts of it have the longest latency. Based on my research, the massive amounts of matricial multiplication required by CNNs makes running them on CPUs and even GPUs…
Ricardo
  • 65
  • 5
3
votes
1 answer

Are the addresses displayed by objdump final addresses or just offsets?

Assume this C code, compiled with gcc file.c: int main(){ return 0; } Generated output with objdump: 0000000000000660
: 660: 55 push %rbp 661: 48 89 e5 mov %rsp,%rbp 664: b8 00 00 00 00 …
Dan
  • 2,694
  • 1
  • 6
  • 19
3
votes
1 answer

Disassembly of the .rodata section for global variables in C++ (objdump -D)

I am looking to better understand assembly instructions pertaining to C++. I have written a simple .cc file to try to reverse engineer it, but I am having trouble understanding what is going on. Ultimately, I want to gain more insight into what is…
jerry g
  • 91
  • 3
3
votes
0 answers

Find symbols in disassembly of exe file using llvm-objdump

I'm compiling a program on windows using cmake and clang-cl with flags /Zi and /DEBUG:FULL. I can step through the program using VS code and it shows function names in the call stack. However, when I try to disassemble with llvm-objdump, I get the…
Mohammed
  • 313
  • 2
  • 9