summaryrefslogtreecommitdiff
path: root/bfd/bfd-in2.h
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>1999-11-29 20:33:38 +0000
committerJim Blandy <jimb@codesourcery.com>1999-11-29 20:33:38 +0000
commit1310fb8d6c14a0c7c2b4e34390181948c4c360d4 (patch)
treef96fa776769586403fac68b1d5469bb70e673763 /bfd/bfd-in2.h
parentc1cea5a800cbe1ffec6528466599c7c544cabd9e (diff)
downloadbinutils-redhat-1310fb8d6c14a0c7c2b4e34390181948c4c360d4.tar.gz
* elf.c (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New
functions. * bfd-in2.h (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New declarations.
Diffstat (limited to 'bfd/bfd-in2.h')
-rw-r--r--bfd/bfd-in2.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 9fe0cfbb57..50539b124b 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -3091,6 +3091,22 @@ bfd_set_format PARAMS ((bfd *abfd, bfd_format format));
CONST char *
bfd_format_string PARAMS ((bfd_format format));
+
+/* Return an upper bound on the number of bytes required to store a
+ copy of ABFD's program header table entries. Return -1 if an error
+ occurs; bfd_get_error will return an appropriate code. */
+extern long bfd_get_elf_phdr_upper_bound PARAMS ((bfd *abfd));
+
+/* Copy ABFD's program header table entries to *PHDRS. The entries
+ will be stored as an array of Elf_Internal_Phdr structures, as
+ defined in include/elf/internal.h. To find out how large the
+ buffer needs to be, call bfd_get_elf_phdr_upper_bound.
+
+ Return the number of program header table entries read, or -1 if an
+ error occurs; bfd_get_error will return an appropriate code. */
+extern int bfd_get_elf_phdrs PARAMS ((bfd *abfd, void *phdrs));
+
+
#ifdef __cplusplus
}
#endif