diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2008-12-15 02:10:27 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@axis.com> | 2008-12-15 02:10:27 +0000 |
commit | 04c8582d3a138d480d9ad580d995172babce2ad4 (patch) | |
tree | 5be3957bf604de0941dae2bac6b7a63504d5e135 /bfd/elf32-cris.c | |
parent | a3064ecd7d4f5c1fde2b27ad81fe34d1339ef622 (diff) | |
download | binutils-redhat-04c8582d3a138d480d9ad580d995172babce2ad4.tar.gz |
* elf32-cris.c (elf_cris_got_elt_size) <symtab_hdr>: Initialize
using ibfd, not abfd.
Diffstat (limited to 'bfd/elf32-cris.c')
-rw-r--r-- | bfd/elf32-cris.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index 72916f2aa7..87c8026427 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; } |