From my book:
.bss:
Uninitialized global C variables
COMMON:
Uninitalized data objects that are not yet allocated
I have to say, I don't quite see a clear distinction. I don't even quite understand what an uninitizalied, non-allocated data object is...seems like nothing. I've used GNU's readelf
tool to try to take a look at some simple C code, but can't find a single COMMON symbol. I've read things like FORTRAN's COMMON type is an example of a COMMON symbol - but I don't know FORTRAN
Can someone possibly distinguish the two for me? If at all possible, hopefully with a C example? Greatly appreciated.
edit: from this post, the variable c here:
int c;
int main() {} ...
should be COMMON. But using objdump -t
shows for me that c is in .bss...
confused
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…