summaryrefslogtreecommitdiff
path: root/gold/incremental.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2011-04-12 05:55:33 +0000
committerIan Lance Taylor <ian@airs.com>2011-04-12 05:55:33 +0000
commit614d852e5f86156cd62f4da9b1b2cf08b22d6293 (patch)
tree1b094231f0f0d7021a867266add9f195ace89f9f /gold/incremental.cc
parent5cfda08e33d63954a8737976c49ecebb6c504d8c (diff)
downloadbinutils-redhat-614d852e5f86156cd62f4da9b1b2cf08b22d6293.tar.gz
* incremental.cc (Sized_incr_relobj::do_add_symbols): Always
initialize local variable v.
Diffstat (limited to 'gold/incremental.cc')
-rw-r--r--gold/incremental.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/gold/incremental.cc b/gold/incremental.cc
index e4c0fe15e9..ba89e0569e 100644
--- a/gold/incremental.cc
+++ b/gold/incremental.cc
@@ -1668,7 +1668,7 @@ Sized_incr_relobj<size, big_endian>::do_add_symbols(
if (!strtab.get_c_string(gsym.get_st_name(), &name))
name = "";
- typename elfcpp::Elf_types<size>::Elf_Addr v;
+ typename elfcpp::Elf_types<size>::Elf_Addr v = gsym.get_st_value();
unsigned int shndx = gsym.get_st_shndx();
elfcpp::STB st_bind = gsym.get_st_bind();
elfcpp::STT st_type = gsym.get_st_type();
@@ -1688,7 +1688,6 @@ Sized_incr_relobj<size, big_endian>::do_add_symbols(
{
// Find the input section and calculate the section-relative value.
gold_assert(shndx != elfcpp::SHN_UNDEF);
- v = gsym.get_st_value();
Output_section* os = this->ibase_->output_section(shndx);
gold_assert(os != NULL && os->has_fixed_layout());
typename Input_entry_reader::Input_section_info sect =