This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH: Disallow a symbol equated to common symbol
- From: "H. J. Lu" <hjl at lucon dot org>
- To: binutils at sources dot redhat dot com
- Date: Fri, 6 Feb 2004 17:28:44 -0800
- Subject: PATCH: Disallow a symbol equated to common symbol
Gas will silently discard symbols equated to common symbols. It is
not what the programmer intended. This patch disallows it.
H.J.
---
2004-02-06 H.J. Lu <hongjiu.lu@intel.com>
* write.c (write_object_file): Disallow a symbol equated to
common symbol.
--- gas/write.c.set 2003-12-08 10:01:40.000000000 -0800
+++ gas/write.c 2004-02-06 11:22:10.000000000 -0800
@@ -1919,6 +1919,9 @@ write_object_file (void)
symbols. */
if (symbol_equated_reloc_p (symp))
{
+ if (S_IS_COMMON (symp))
+ as_bad (_("`%s' can't be equated to common symbol"),
+ S_GET_NAME (symp));
symbol_remove (symp, &symbol_rootP, &symbol_lastP);
continue;
}