From: Hans-Peter Nilsson Date: Mon, 15 Dec 2008 02:10:27 +0000 (+0000) Subject: * elf32-cris.c (elf_cris_got_elt_size) : Initialize X-Git-Tag: sid-snapshot-20090201~455 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b2e254f9704b90a154fe9259a1ebdf43dd21cf8f;p=platform%2Fupstream%2Fbinutils.git * elf32-cris.c (elf_cris_got_elt_size) : Initialize using ibfd, not abfd. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 9bb846d..c9ca962 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2008-12-15 Hans-Peter Nilsson + + * elf32-cris.c (elf_cris_got_elt_size) : Initialize + using ibfd, not abfd. + 2008-12-11 Alan Modra PR 7041 diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index 72916f2..87c8026 100644 --- a/bfd/elf32-cris.c +++ b/bfd/elf32-cris.c @@ -4094,13 +4094,13 @@ elf_cris_got_elt_size (bfd *abfd ATTRIBUTE_UNUSED, unsigned long symndx) { struct elf_link_hash_entry *h = (struct elf_link_hash_entry *) hr; - Elf_Internal_Shdr *symtab_hdr = &elf_tdata (abfd)->symtab_hdr; bfd_vma eltsiz = 0; /* We may have one regular GOT entry or up to two TLS GOT entries. */ if (h == NULL) { + Elf_Internal_Shdr *symtab_hdr = &elf_tdata (ibfd)->symtab_hdr; bfd_signed_vma *local_got_refcounts = elf_local_got_refcounts (ibfd); BFD_ASSERT (local_got_refcounts != NULL); @@ -4137,6 +4137,9 @@ elf_cris_got_elt_size (bfd *abfd ATTRIBUTE_UNUSED, eltsiz += 4; } + /* We're only called when h->got.refcount is non-zero, so we must + have a non-zero size. */ + BFD_ASSERT (eltsiz != 0); return eltsiz; }