I'm still a beginner in assembly language, and I want to understand what do the directives .lcomm
and .comm
mean in fact ?
I did a search in google, and found that .lcomm
stands for local common, but I really don't understand what is that. Can someone clarify it please ?
When a Unix process is run, it has an area called bss which is usually initialized to zero. Both .comm and .lcomm locations are allocated in bss. A .comm symbol is marked as global while a .lcomm symbol isn't.
If you have two files with the same symbols marked as .lcomm they will refer to different memory locations in bss. On the other hand, if you have two files with the same symbol marked as .comm they will refer to the same memory location in bss.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With