aboutsummaryrefslogtreecommitdiff
path: root/gold/symtab.cc
diff options
context:
space:
mode:
authorChris Demetriou <cgd@google.com>2009-02-06 19:20:10 +0000
committerChris Demetriou <cgd@google.com>2009-02-06 19:20:10 +0000
commitf073bbf7e0a9d7ebe5323c660b34c893c5dfedee (patch)
tree2a2c928d8b04dba0709b00826ab5f15552b10a2a /gold/symtab.cc
parent5a7c5e86304d6298cbeee81f07b626b194980073 (diff)
downloadgdb-f073bbf7e0a9d7ebe5323c660b34c893c5dfedee.zip
gdb-f073bbf7e0a9d7ebe5323c660b34c893c5dfedee.tar.gz
gdb-f073bbf7e0a9d7ebe5323c660b34c893c5dfedee.tar.bz2
2009-02-06 Chris Demetriou <cgd@google.com>
* gold.h (gold_undefined_symbol): Change to take only a Symbol pointer and to report location as the file name associated with the symbol. (gold_undefined_symbol_at_location): New function to replace the old gold_undefined_symbol functionality. * target-reloc.h (relocate_section): Update to use gold_undefined_symbol_at_location. * symtab.cc (Symbol_table::warn_about_undefined_dynobj_symbol): Call gold_undefined_symbol function rather than gold_error. * errors.h (Errors::undefined_symbol): Take location as a string, rather than calculating it from a relocation. * errors.cc (Errors::fatal): Print "fatal error:" before the formatted message. (Errors::error, Errors::error_at_location): Print "error: " before the formatted message. (Errors::undefined_symbol): Take location as a string, rather than calculating it from a relocation. (gold_undefined_symbol_at_location): New function akin to old gold_undefined_symbol, calculates location from relocation. (gold_undefined_symbol): Change to take only a Symbol pointer and to report location as the file name associated with the symbol. * testsuite/debug_msg.sh: Update for changed error messages. * testsuite/undef_symbol.sh: Likewise.
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r--gold/symtab.cc12
1 files changed, 1 insertions, 11 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc
index 11feb03..5408385 100644
--- a/gold/symtab.cc
+++ b/gold/symtab.cc
@@ -2634,17 +2634,7 @@ Symbol_table::warn_about_undefined_dynobj_symbol(
// A very ugly cast.
Dynobj* dynobj = static_cast<Dynobj*>(sym->object());
if (!dynobj->has_unknown_needed_entries())
- {
- if (sym->version())
- gold_error(_("%s: undefined reference to '%s', version '%s'"),
- sym->object()->name().c_str(),
- sym->demangled_name().c_str(),
- sym->version());
- else
- gold_error(_("%s: undefined reference to '%s'"),
- sym->object()->name().c_str(),
- sym->demangled_name().c_str());
- }
+ gold_undefined_symbol(sym);
}
}