This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: ld and common symbols
- To: Nick Clifton <nickc at cygnus dot com>
- Subject: Re: ld and common symbols
- From: Roland McGrath <roland at frob dot com>
- Date: Tue, 21 Dec 1999 18:44:46 -0500
- Cc: Philip dot Blundell at pobox dot com, binutils at sourceware dot cygnus dot com
> 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?