tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: "common" symbols are no longer common?
> I'm not sure I understand this correctly.
> Is this about several compilation units declaring
> extern int foo;
> and no-one declaring
> int foo;
> and the question whether linking them together regards foo as undefined?
No; it's about multiple compilation units declaring
int foo;
(and at most one CU doing similarly but with an initializer).
In the common model, this generates a common symbol foo (or, with the
initializer, a data-segment definition of foo). In the def/ref model,
it generates a data-segment definition even with no initializer.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index