aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-mips.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-05-23 08:23:27 +0000
committerNick Clifton <nickc@redhat.com>2001-05-23 08:23:27 +0000
commitd9bc7a4499c25b26971d80e2392a6da6e84cbe21 (patch)
tree1aaf6ffea75c9c46b0a162c38d9fec15951869a2 /bfd/elf32-mips.c
parent60edd2d3f1f08fff5dc35137a16c5ec4eaa8392e (diff)
downloadgdb-d9bc7a4499c25b26971d80e2392a6da6e84cbe21.zip
gdb-d9bc7a4499c25b26971d80e2392a6da6e84cbe21.tar.gz
gdb-d9bc7a4499c25b26971d80e2392a6da6e84cbe21.tar.bz2
Replace sh_size/sh_entsize with NUM_SHDR_ENTRIES
Diffstat (limited to 'bfd/elf32-mips.c')
-rw-r--r--bfd/elf32-mips.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index c2dd847..70e9dc9 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -3071,7 +3071,7 @@ _bfd_mips_elf_fake_sections (abfd, hdr, sec)
boolean
_bfd_mips_elf_section_from_bfd_section (abfd, hdr, sec, retval)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
Elf_Internal_Shdr *hdr ATTRIBUTE_UNUSED;
asection *sec;
int *retval;
@@ -6822,8 +6822,7 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
REL_HDR is read before its REL_HDR2. */
rel_hdr = &elf_section_data (input_section)->rel_hdr;
if ((size_t) (rel - relocs)
- >= (rel_hdr->sh_size / rel_hdr->sh_entsize
- * bed->s->int_rels_per_ext_rel))
+ >= (NUM_SHDR_ENTRIES (rel_hdr) * bed->s->int_rels_per_ext_rel))
rel_hdr = elf_section_data (input_section)->rel_hdr2;
if (rel_hdr->sh_entsize == MIPS_ELF_REL_SIZE (input_bfd))
{
@@ -7592,7 +7591,7 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
asection **n;
if (elf_bad_symtab (abfd))
- symcount = symtab_hdr->sh_size / symtab_hdr->sh_entsize;
+ symcount = NUM_SHDR_ENTRIES (symtab_hdr);
else
symcount = symtab_hdr->sh_info;
n = (asection **) bfd_zalloc (abfd,
@@ -7707,7 +7706,7 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
if (r_symndx < extsymoff)
h = NULL;
- else if (r_symndx >= extsymoff + (symtab_hdr->sh_size / symtab_hdr->sh_entsize))
+ else if (r_symndx >= extsymoff + NUM_SHDR_ENTRIES (symtab_hdr))
{
(*_bfd_error_handler)
(_("Malformed reloc detected for section %s"), name);