This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: An undefined typed symbol bug?
- From: Ian Lance Taylor <ian at airs dot com>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: binutils at sources dot redhat dot com
- Date: 21 Aug 2003 16:10:08 -0700
- Subject: Re: An undefined typed symbol bug?
- References: <20030821224226.GA23478@lucon.org>
"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