[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: warning messages from common symbol alignment from elflink.h revisio
From: |
Nick Clifton |
Subject: |
Re: warning messages from common symbol alignment from elflink.h revision1.212 |
Date: |
Mon, 08 Mar 2004 14:56:20 +0000 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.2 (gnu/linux) |
Hi Robert,
> I am linking object files built using the lahey-fujitsu fortran
> compiler on i386 linux. In going from binutils-2.13 to
> binutils-2.14, the warning messages listed below have
> appeared which seems to come from an addition by nickc to elflink.h,
> revision 1.212 April 14,2003.
> The code appears to run ok so I have a couple of questions,
> 1) What do these messages mean? The symbols refer to the names of
> named common blocks.
>
> /home/randre/GNU/binutils-2.14/ld/ld-new: Warning: alignment 4
> of symbol `urdprdef_' in lib/ureadsub.a(usinit.o) is smaller
> than 8 in lib/ureadsub.a(usinit.o)
Right - but these blocks have an alignment associated with them. So
the block associated with the symbol "urdprdef_" is being declared
once as having an alignment requirement of 4 bytes and then a second
time as having an alignment requirement of 8 bytes. The linker will
preserve the greater alignment requirement, but it issues the warning
because the mismatch indicates that the block is not being declared
consistently in the user's code. This could indicate a programming
error.
> 2) If they are innocuous can they be turned off since they are a
> distraction when linking hundreds of executables with lots of
> commons.
At the moment there is no switch to turn these warnings off. There
are four ways that you could solve this problem:
* Ignore the warnings.
* Generate a patch to add a switch that suppresses them and submit
it for approval.
* Fix the code that is being linked so that it no longer has
mismatching alignment requirements for the symbols concerned.
* Pass the output of the linker through a tool to filter out these
messages but leave the others intact. A simple sed script should
do the trick.
Cheers
Nick