aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h5
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