aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfcode.h
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/elfcode.h
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/elfcode.h')
-rw-r--r--bfd/elfcode.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index c5e9821..d9f3e05 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -1373,11 +1373,9 @@ elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
return true;
rel_hdr = &d->rel_hdr;
- reloc_count = rel_hdr->sh_size / rel_hdr->sh_entsize;
+ reloc_count = NUM_SHDR_ENTRIES (rel_hdr);
rel_hdr2 = d->rel_hdr2;
- reloc_count2 = (rel_hdr2
- ? (rel_hdr2->sh_size / rel_hdr2->sh_entsize)
- : 0);
+ reloc_count2 = (rel_hdr2 ? NUM_SHDR_ENTRIES (rel_hdr2) : 0);
BFD_ASSERT (asect->reloc_count == reloc_count + reloc_count2);
BFD_ASSERT (asect->rel_filepos == rel_hdr->sh_offset
@@ -1394,7 +1392,7 @@ elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
return true;
rel_hdr = &d->this_hdr;
- reloc_count = rel_hdr->sh_size / rel_hdr->sh_entsize;
+ reloc_count = NUM_SHDR_ENTRIES (rel_hdr);
rel_hdr2 = NULL;
reloc_count2 = 0;
}