summaryrefslogtreecommitdiff
path: root/bfd/libbfd.h
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2011-06-27 08:40:55 +0000
committerTristan Gingold <gingold@adacore.com>2011-06-27 08:40:55 +0000
commitc44f149f8d40185b9e0ef679c77b3888742cfe2b (patch)
treec304500812635c06dd6bb6d808b3f033c04742f3 /bfd/libbfd.h
parente4309be8c4b46a4c76413266a0744f4d13b957cd (diff)
downloadbinutils-redhat-c44f149f8d40185b9e0ef679c77b3888742cfe2b.tar.gz
2011-06-27 Tristan Gingold <gingold@adacore.com>
* cache.c: Include bfd_stdint.h. (cache_bmmap): Change profile. Return region start and size. * bfdio.c (struct bfd_iovec): Change bmmap profile. (bfd_mmap): Change profile and adjust. Update comment. (memory_bmmap): Change profile. * opncls.c (opncls_bmmap): Change profile. * vms-lib.c (vms_lib_bmmap): Likewise. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate.
Diffstat (limited to 'bfd/libbfd.h')
-rw-r--r--bfd/libbfd.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index bd77d8fe81..dd4cc94440 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -850,9 +850,15 @@ struct bfd_iovec
int (*bclose) (struct bfd *abfd);
int (*bflush) (struct bfd *abfd);
int (*bstat) (struct bfd *abfd, struct stat *sb);
- /* Just like mmap: (void*)-1 on failure, mmapped address on success. */
+ /* Mmap a part of the files. ADDR, LEN, PROT, FLAGS and OFFSET are the usual
+ mmap parameter, except that LEN and OFFSET do not need to be page
+ aligned. Returns (void *)-1 on failure, mmapped address on success.
+ Also write in MAP_ADDR the address of the page aligned buffer and in
+ MAP_LEN the size mapped (a page multiple). Use unmap with MAP_ADDR and
+ MAP_LEN to unmap. */
void *(*bmmap) (struct bfd *abfd, void *addr, bfd_size_type len,
- int prot, int flags, file_ptr offset);
+ int prot, int flags, file_ptr offset,
+ void **map_addr, bfd_size_type *map_len);
};
extern const struct bfd_iovec _bfd_memory_iovec;
/* Extracted from bfdwin.c. */