diff options
author | Ian Lance Taylor <iant@google.com> | 2007-11-14 01:03:01 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-11-14 01:03:01 +0000 |
commit | a55ce7febfaa52670ce3d9c236d3033de80ac091 (patch) | |
tree | 5955950569cfe09f083ba0e217a1a8085a844103 /gold/resolve.cc | |
parent | b3c8c50a8f21a913e6c5dc91ff843cd4e924b01a (diff) | |
download | gdb-a55ce7febfaa52670ce3d9c236d3033de80ac091.zip gdb-a55ce7febfaa52670ce3d9c236d3033de80ac091.tar.gz gdb-a55ce7febfaa52670ce3d9c236d3033de80ac091.tar.bz2 |
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.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gold/resolve.cc b/gold/resolve.cc index 980831b..b3328d5 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 |