aboutsummaryrefslogtreecommitdiff
path: root/gold/symtab.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
commita55ce7febfaa52670ce3d9c236d3033de80ac091 (patch)
tree5955950569cfe09f083ba0e217a1a8085a844103 /gold/symtab.cc
parentb3c8c50a8f21a913e6c5dc91ff843cd4e924b01a (diff)
downloadgdb-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/symtab.cc')
-rw-r--r--gold/symtab.cc52
1 files changed, 2 insertions, 50 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc
index be88534..9bee283 100644
--- a/gold/symtab.cc
+++ b/gold/symtab.cc
@@ -1808,54 +1808,6 @@ Symbol_table::sized_write_section_symbol(const Output_section* os,
void
Symbol_table::detect_odr_violations() const
{
- if (parameters->get_size() == 32)
- {
- if (!parameters->is_big_endian())
- {
-#ifdef HAVE_TARGET_32_LITTLE
- this->sized_detect_odr_violations<32, false>();
-#else
- gold_unreachable();
-#endif
- }
- else
- {
-#ifdef HAVE_TARGET_32_BIG
- this->sized_detect_odr_violations<32, true>();
-#else
- gold_unreachable();
-#endif
- }
- }
- else if (parameters->get_size() == 64)
- {
- if (!parameters->is_big_endian())
- {
-#ifdef HAVE_TARGET_64_LITTLE
- this->sized_detect_odr_violations<64, false>();
-#else
- gold_unreachable();
-#endif
- }
- else
- {
-#ifdef HAVE_TARGET_64_BIG
- this->sized_detect_odr_violations<64, true>();
-#else
- gold_unreachable();
-#endif
- }
- }
- else
- gold_unreachable();
-}
-
-// Implement detect_odr_violations.
-
-template<int size, bool big_endian>
-void
-Symbol_table::sized_detect_odr_violations() const
-{
for (Odr_map::const_iterator it = candidate_odr_violations_.begin();
it != candidate_odr_violations_.end();
++it)
@@ -1874,9 +1826,9 @@ Symbol_table::sized_detect_odr_violations() const
// one Task for object, plus appropriate locking to ensure
// that we don't conflict with other uses of the object.
locs->object->lock();
- Dwarf_line_info<size, big_endian> line_info(locs->object);
+ std::string lineno = Dwarf_line_info::one_addr2line(
+ locs->object, locs->shndx, locs->offset);
locs->object->unlock();
- std::string lineno = line_info.addr2line(locs->shndx, locs->offset);
if (!lineno.empty())
line_nums.insert(lineno);
}