aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
Diffstat (limited to 'gold')
-rw-r--r--gold/ChangeLog5
-rw-r--r--gold/target-reloc.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 4d524d7..78b5579 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,8 @@
+2020-06-24 Nick Clifton <nickc@redhat.com>
+
+ * target-reloc.h (issue_discarded_error): Initialise the
+ key_symndx variable.
+
2020-06-23 Roland McGrath <mcgrathr@google.com>
PR 22843
diff --git a/gold/target-reloc.h b/gold/target-reloc.h
index 2b205a1..e9e3e5b 100644
--- a/gold/target-reloc.h
+++ b/gold/target-reloc.h
@@ -258,7 +258,7 @@ issue_discarded_error(
&is_ordinary);
if (orig_shndx != elfcpp::SHN_UNDEF)
{
- unsigned int key_symndx;
+ unsigned int key_symndx = 0;
Relobj* kept_obj = object->find_kept_section_object(orig_shndx,
&key_symndx);
if (key_symndx != 0)