This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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;
 	    }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]