From 38985a1cb4890f44601f781654c6d79485634120 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Wed, 29 Jan 2003 08:29:34 +0000 Subject: [PATCH] * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference entry->abfd when it's NULL. --- bfd/ChangeLog | 5 +++++ bfd/elfxx-mips.c | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d75b0ee35bb..53e6b0733e5 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2003-01-29 Alexandre Oliva + + * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference + entry->abfd when it's NULL. + 2003-01-27 Alexandre Oliva * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 12d898e313b..22cc8a2ce68 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -1584,10 +1584,11 @@ mips_elf_got_entry_hash (entry_) { const struct mips_got_entry *entry = (struct mips_got_entry *)entry_; - return entry->abfd->id + entry->symndx + return entry->symndx + (! entry->abfd ? mips_elf_hash_bfd_vma (entry->d.address) - : entry->symndx >= 0 ? mips_elf_hash_bfd_vma (entry->d.addend) - : entry->d.h->root.root.root.hash); + : entry->abfd->id + + (entry->symndx >= 0 ? mips_elf_hash_bfd_vma (entry->d.addend) + : entry->d.h->root.root.root.hash)); } static int -- 2.30.2