An undefined typed symbol bug?
Ian Lance Taylor
ian@airs.com
Thu Aug 21 23:10:00 GMT 2003
"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
More information about the Binutils
mailing list