Source C code:
static int b;
Corresponding .bss section disassemble code in object file:
Disassembly of section .bss:
00000000 <b>:
   0:   00 00                   add    %al,(%eax)
   2:   00 00                   add    %al,(%eax)
Based on the info of section header:
  3 .bss          00000004  00000000  00000000  00000068  2**2
                  ALLOC
Obviously, .bss exists and occupies a certain space (matches with hex dump)!
Two things I wanna ask,
1.When I use readelf to dump .bss section:
readelf -x .bss section_test.o
Section '.bss' has no data to dump.
I just don't get it. It definitely has some data, right?
2.How to understand those code in .bss section? I mean, I totally understand them individually as assembly, but I just feel kinda confused about why they are here?
Thx.
Extra info: MacOS using Docker (Ubuntu), AT&T syntax, x86_64 Arch(physical) but using elf_i386(32-bit) arch when compiling and linking stage.