This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]