"Warning: size of symbol FOO changed from X to Y in OBJ"

H . J . Lu hjl@lucon.org
Thu May 31 09:35:00 GMT 2001


On Thu, May 31, 2001 at 12:25:21AM -0700, Ian Lance Taylor wrote:
> "H . J . Lu" <hjl@lucon.org> writes:
> 
> > BTW, I believe "Warning: size of symbol FOO changed from X to Y in OBJ"
> > is a fatal error if X > Y.
> 
> That is not clear to me.  For cases where this warning arises, the
> linker is not going to take any action based on the symbol size.  The
> linker only uses the symbol size for common symbols, and changes in
> common symbol size are handled in a different way.

I thought the warning was for common symbol. In any case, if you
override a definition with another one of a smaller size, I believe
something will go wrong if some code still uses the larger size.

I'd like to see a testcase for it.


H.J.



More information about the Binutils mailing list