summaryrefslogtreecommitdiff
path: root/gold/resolve.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-11-14 01:03:01 +0000
committerIan Lance Taylor <iant@google.com>2007-11-14 01:03:01 +0000
commitc4961e9a188efdc628f660221af5cedebef43abe (patch)
treedf95d207f19d76e8da07f90b4dc790b11d8cd9aa /gold/resolve.cc
parent4082f9b5883e19ed907b62f64057d6c7bb02614d (diff)
downloadbinutils-redhat-c4961e9a188efdc628f660221af5cedebef43abe.tar.gz
From Craig Silverstein: Rework debug info code a bit, add option for
ODR violations, add test case.
Diffstat (limited to 'gold/resolve.cc')
-rw-r--r--gold/resolve.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gold/resolve.cc b/gold/resolve.cc
index 980831b795..b3328d564f 100644
--- a/gold/resolve.cc
+++ b/gold/resolve.cc
@@ -243,7 +243,8 @@ Symbol_table::resolve(Sized_symbol<size>* to,
// is an ODR violation. But it's helpful to warn about.)
// We use orig_sym here because we want the symbol exactly as it
// appears in the object file, not munged via our future processing.
- if (orig_sym.get_st_bind() == elfcpp::STB_WEAK
+ if (parameters->detect_odr_violations()
+ && orig_sym.get_st_bind() == elfcpp::STB_WEAK
&& to->binding() == elfcpp::STB_WEAK
&& orig_sym.get_st_shndx() != elfcpp::SHN_UNDEF
&& to->shndx() != elfcpp::SHN_UNDEF