Re: "common" symbols are no longer common?
Mouse <[email protected]> Sat, 22 Feb 2025 11:40:24 -0500 (EST)
| Newsgroups | gmane.os.netbsd.devel.toolchain |
|---|---|
| Message-ID | <[email protected]> |
> 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 [email protected] / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B