0

I am learning the toolchains for my C++ and trying out the objdump.

The disassembled file from objdump doesn't even have the word "Hello World". Why is that? Is it not reliable at all?

unj2
  • 52,135
  • 87
  • 247
  • 375

1 Answers1

2

The following code:

#include <stdio.h>
int main(void) { printf("Hello world\n"); }

can be completely disassembled with objdump -Dslx my_prog, which reveals, amongst other things, the following:

Contents of section .rodata:
 400598 01000200 00000000 00000000 00000000  ................
 4005a8 48656c6c 6f20776f 726c6400           Hello world.

If yours is different, then please post code, etc.

Oliver Charlesworth
  • 267,707
  • 33
  • 569
  • 680