This is the mail archive of the binutils@sources.redhat.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]
Other format: [Raw text]

Re: An undefined typed symbol bug?


"H. J. Lu" <hjl@lucon.org> writes:

> I got
> 
> # make
> cc    -c -o x.o x.c
> as   -o y.o y.s
> ld -r -o foo.o x.o y.o
> ld -r -o foo.o y.o x.o
> ld: Warning: type of symbol `foo' changed from 1 to 2 in x.o
> 
> y.o has an undefined typed symbol, foo. Depending on if the linker
> sees the definition first, ld may issue a warning. I'd like to get
> rid of the warning. Any comments?

I'm not sure what you mean here.  Getting rid of the warning entirely
doesn't seem appropriate.  Skipping the warning if the symbol is
undefined seems plausible.

But note that the symbol type does matter even for an undefined
symbol, as it affects the type of dynamic relocation which will be
generated in adjust_dynamic_symbol().

Ian


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