I was messing around with an .o object file and exploring it.
I was having trouble with modifying redis source, and ended up
doing an objdump -t on the object.o.
I noticed an entry ‘bloom ‘ with the section classification as
So what exactly does *COM* section mean in a elf object file?
After googling and traipsing through a list of links,on google page,
and stack overflow questions, I finally found this meaningful.
Unfortunately, it seems to be a documentation for solaris, or atleast written by the solaris team.
Any case, it’s meaningful. The basic reasoning being if the linker finds any variable at the file scope level,
that is not initialized or declared extern, it assumes that variable is defined in another source file.
And therefore while creating the ELF object file it marks that variable as COMMON blocks.
As it turns out the name COMMON blocks, originated while linking fortran files.
It seems it used to be a common practice in the days of Fortran based program compiling and linking.