From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roland McGrath To: Nick Clifton Cc: Philip.Blundell@pobox.com, binutils@sourceware.cygnus.com Subject: Re: ld and common symbols Date: Tue, 21 Dec 1999 15:44:00 -0000 Message-id: <199912212344.SAA02315@frob.com> References: <199912212150.NAA16520@elmo.cygnus.com> X-SW-Source: 1999-12/msg00091.html > I think we would all agree that if t2.c had contained this line: > > int bar = 2; > > then the linker would have been justified in issueing the error about > a multiply defined symbol. I am not sure however, what the concessus > will be for the correct behaviour in the case you outline above. > Persoanlly I think the linker is doing the right thing in complaining, > since bar ought to only be defined and initlaised in one palce, and > the other files ought to just contain references to it. Sorry, you are just completely wrong. This is what common definitions (i.e. uninitialized C variables) have always done. Didn't we just cover this?