aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfcode.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-09-21 09:59:19 +0000
committerAlan Modra <amodra@gmail.com>2002-09-21 09:59:19 +0000
commit5ad8645cf8d41991011e0ba4d274400231c61c35 (patch)
tree17481c63405ebff1ae7a01698ae5ff3b8ebf8d59 /bfd/elfcode.h
parent96ea7171296a44988b723f27364558c41c979396 (diff)
downloadgdb-5ad8645cf8d41991011e0ba4d274400231c61c35.zip
gdb-5ad8645cf8d41991011e0ba4d274400231c61c35.tar.gz
gdb-5ad8645cf8d41991011e0ba4d274400231c61c35.tar.bz2
* elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
unsigned. Move "symcount" assignment out of loop. * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regnerate.
Diffstat (limited to 'bfd/elfcode.h')
-rw-r--r--bfd/elfcode.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index ca72307..4f54cd3 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -1377,7 +1377,7 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count,
arelent *relent;
unsigned int i;
int entsize;
- long symcount;
+ unsigned int symcount;
allocated = (PTR) bfd_malloc (rel_hdr->sh_size);
if (allocated == NULL)
@@ -1394,6 +1394,11 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count,
BFD_ASSERT (entsize == sizeof (Elf_External_Rel)
|| entsize == sizeof (Elf_External_Rela));
+ if (dynamic)
+ symcount = bfd_get_dynamic_symcount (abfd);
+ else
+ symcount = bfd_get_symcount (abfd);
+
for (i = 0, relent = relents;
i < reloc_count;
i++, relent++, native_relocs += entsize)
@@ -1420,11 +1425,6 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count,
else
relent->address = rela.r_offset - asect->vma;
- if (dynamic)
- symcount = bfd_get_dynamic_symcount (abfd);
- else
- symcount = bfd_get_symcount (abfd);
-
if (ELF_R_SYM (rela.r_info) == 0)
relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
else if (ELF_R_SYM (rela.r_info) > symcount)