[patch] ld/Error reporting when commons are different sizes.
Ian Lance Taylor
Fri Feb 25 10:59:00 GMT 2000
Date: Fri, 25 Feb 2000 10:24:30 -0800
From: Catherine Moore <email@example.com>
I would like to submit the following patch for inclusion in ld.
This patch will cause an error message to be generated when commons
of different sizes are merged. The previous behavior was to
generate a warning message. A new option, --no-error-common-size
will cause the error to be reported as a warning.
Please let me know if this is okay to commit.
If I read this correctly, this patch changes the linker to by default
give an error if two common symbols have a different size. That is
not acceptable. Common symbols routinely have different sizes when
linking Fortran programs.
The current behaviour is to not even warn about common symbols with
different sizes. I believe that is the best default behaviour. There
are some Unix linkers which warn by default, such as the Irix linker.
I don't know of any which give an error by default.
It would be OK to add an option to make the current common symbol
warning into an error. Perhaps we should implement something like
gcc's -Werror for the linker. But I don't think we should change the
More information about the Binutils