This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
gold patch committed: Add --warn-constructors
- From: Ian Lance Taylor <iant at google dot com>
- To: binutils at sourceware dot org
- Date: Tue, 03 Nov 2009 07:59:55 -0800
- Subject: gold patch committed: Add --warn-constructors
The GNU linker accepts a --warn-constructors option. For ELF, it
essentially ignores it. I added this as an option to gold.
It would be possible to make this warning meaningful for ELF, by
warning about __GLOBAL__I__xxx symbols, or perhaps about a non-empty
.ctors section. However, I don't think such a warning would be
particularly useful these days, so since GNU ld doesn't warn, gold
doesn't warn either.
Ian
2009-11-03 Ian Lance Taylor <iant@google.com>
* options.h (class General_options): Add --warn_constructors.
Index: options.h
===================================================================
RCS file: /cvs/src/src/gold/options.h,v
retrieving revision 1.115
diff -p -u -r1.115 options.h
--- options.h 28 Oct 2009 00:42:34 -0000 1.115
+++ options.h 3 Nov 2009 15:55:26 -0000
@@ -918,6 +918,9 @@ class General_options
DEFINE_special(version_script, options::TWO_DASHES, '\0',
N_("Read version script"), N_("FILE"));
+ DEFINE_bool(warn_constructors, options::TWO_DASHES, '\0', false,
+ N_("Ignored"), N_("Ignored"));
+
DEFINE_bool(warn_search_mismatch, options::TWO_DASHES, '\0', true,
N_("Warn when skipping an incompatible library"),
N_("Don't warn when skipping an incompatible library"));