This is the mail archive of the binutils@sourceware.cygnus.com 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]

Re: ld and common symbols


> 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?

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