This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: [patch] ld/Error reporting when commons are different sizes.
- To: clm at cygnus dot com
- Subject: Re: [patch] ld/Error reporting when commons are different sizes.
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 25 Feb 2000 13:58:55 -0500
- CC: binutils at sourceware dot cygnus dot com
- References: <200002251824.KAA01897@cygint.cygnus.com>
Date: Fri, 25 Feb 2000 10:24:30 -0800
From: Catherine Moore <clm@cygnus.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
default behaviour.
Ian