Question

Test is on Linux 32bit.

I use this command to get the context of .text .rodata and .data section:

objdump -s -j .text elf_binary
objdump -s -j .rodata elf_binary
objdump -s -j .data elf_binary

But basically when I tried to use this to get the content of .bss section, I always get the error shown below:

objdump -s -j .bss elf_binary

objdump: section '.bss' mentioned in a -j option, but not found in any input file

Basically how can I get the content of .bss section from ELF binary?

Was it helpful?

Solution

The .bss section comprises zero-valued data. Usually, an object file only contains the desired start address and extent of the section, but does not actually reserve space for its bits.

Please see the Wikipedia article on .bss has more information.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top