This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
lcomm variables on mips
- From: "Eric Fisher" <joefoxreal at gmail dot com>
- To: binutils at sourceware dot org
- Date: Wed, 5 Apr 2006 11:38:57 +0800
- Subject: lcomm variables on mips
Hi
Here is a question about lcomm variables on mips.
Suppose I define two lcomm variables with same name in two modules,
.ent mod1
mod1:
.lcomm lv, 16
......
.end mod1
.ent mod2
mod2:
.lcomm lv, 18
........
.end mod2
After assembled, the variable lv will be allocated into .bss section
with 18 bytes length. Seems that the two local variables use the same
address and larger size.
But, if we call the mod2 in mod1, and change the value of lv in mod2,
this will obviously affect the lv in mod1.
So I'd like to know who is responsible to this problem? The programmer
or the assembler?
Thanks
Eric.