This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: MIPS multi-got link support
On Jan 27, 2003, Eric Christopher <echristo@redhat.com> wrote:
>> unchanged since the first posting. Ok to install?
> Yup. OK.
Ok, so, I was testing whether you'd catch the obvious mistake that you
can't dereference abfd for its id if it's NULL :-D, but you didn't.
I'm putting this in anyway, as obviously correct. Apologies for the
breakage.
Index: bfd/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
entry->abfd when it's NULL.
Index: bfd/elfxx-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-mips.c,v
retrieving revision 1.40
diff -u -p -r1.40 elfxx-mips.c
--- bfd/elfxx-mips.c 28 Jan 2003 00:18:45 -0000 1.40
+++ bfd/elfxx-mips.c 29 Jan 2003 08:26:24 -0000
@@ -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
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer