diff options
author | Nick Clifton <nickc@redhat.com> | 2001-05-23 08:23:27 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2001-05-23 08:23:27 +0000 |
commit | d9bc7a4499c25b26971d80e2392a6da6e84cbe21 (patch) | |
tree | 1aaf6ffea75c9c46b0a162c38d9fec15951869a2 /bfd/elf-bfd.h | |
parent | 60edd2d3f1f08fff5dc35137a16c5ec4eaa8392e (diff) | |
download | gdb-d9bc7a4499c25b26971d80e2392a6da6e84cbe21.zip gdb-d9bc7a4499c25b26971d80e2392a6da6e84cbe21.tar.gz gdb-d9bc7a4499c25b26971d80e2392a6da6e84cbe21.tar.bz2 |
Replace sh_size/sh_entsize with NUM_SHDR_ENTRIES
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r-- | bfd/elf-bfd.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index fd3f347..f5b74e9 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -27,6 +27,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "elf/external.h" #include "bfdlink.h" +/* The number of entries in a section is its size divided by the size + of a single entry. This is normally only applicaable to reloc and + symbol table sections. */ +#define NUM_SHDR_ENTRIES(shdr) ((shdr)->sh_size / (shdr)->sh_entsize) + /* If size isn't specified as 64 or 32, NAME macro should fail. */ #ifndef NAME #if ARCH_SIZE==64 |