aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfdio.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-03-13 06:45:16 -0700
committerH.J. Lu <hjl.tools@gmail.com>2024-03-13 06:55:44 -0700
commit4810a2d92b9e1a13774c1286cd8a0f718f81abba (patch)
treeea489f8b4f635d48821bdca606585098e8f560d4 /bfd/bfdio.c
parent2e384d4f44f15e560b2a068e0ed866438aaa7cd7 (diff)
downloadgdb-4810a2d92b9e1a13774c1286cd8a0f718f81abba.zip
gdb-4810a2d92b9e1a13774c1286cd8a0f718f81abba.tar.gz
gdb-4810a2d92b9e1a13774c1286cd8a0f718f81abba.tar.bz2
bfd: Use size_t in the BFD mmap interface
Change the size type in the BFD mmap interface from bfd_size_type to size_t to be consistent with the size type of the host mmap interface. * bfdio.c (bfd_iovec): Change the bmmap size type to size_t. (bfd_mmap): Likewise. (memory_bmmap): Likewise. * cache.c (cache_bmmap): Change the bmmap size type to size_t. * opncls.c (opncls_bmmap): Change the bmmap size type to size_t. * bfd-in2.h: Regenerated. * libbfd.h: Likewise.
Diffstat (limited to 'bfd/bfdio.c')
-rw-r--r--bfd/bfdio.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/bfd/bfdio.c b/bfd/bfdio.c
index 1572de0..4ed0eea 100644
--- a/bfd/bfdio.c
+++ b/bfd/bfdio.c
@@ -219,9 +219,9 @@ DESCRIPTION
. 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,
+. void *(*bmmap) (struct bfd *abfd, void *addr, size_t len,
. int prot, int flags, file_ptr offset,
-. void **map_addr, bfd_size_type *map_len);
+. void **map_addr, size_t *map_len);
.};
.extern const struct bfd_iovec _bfd_memory_iovec;
@@ -638,9 +638,9 @@ FUNCTION
bfd_mmap
SYNOPSIS
- void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len,
+ void *bfd_mmap (bfd *abfd, void *addr, size_t len,
int prot, int flags, file_ptr offset,
- void **map_addr, bfd_size_type *map_len)
+ void **map_addr, size_t *map_len)
ATTRIBUTE_WARN_UNUSED_RESULT;
DESCRIPTION
@@ -651,9 +651,9 @@ DESCRIPTION
*/
void *
-bfd_mmap (bfd *abfd, void *addr, bfd_size_type len,
+bfd_mmap (bfd *abfd, void *addr, size_t len,
int prot, int flags, file_ptr offset,
- void **map_addr, bfd_size_type *map_len)
+ void **map_addr, size_t *map_len)
{
while (abfd->my_archive != NULL
&& !bfd_is_thin_archive (abfd->my_archive))
@@ -815,10 +815,10 @@ memory_bstat (bfd *abfd, struct stat *statbuf)
static void *
memory_bmmap (bfd *abfd ATTRIBUTE_UNUSED, void *addr ATTRIBUTE_UNUSED,
- bfd_size_type len ATTRIBUTE_UNUSED, int prot ATTRIBUTE_UNUSED,
+ size_t len ATTRIBUTE_UNUSED, int prot ATTRIBUTE_UNUSED,
int flags ATTRIBUTE_UNUSED, file_ptr offset ATTRIBUTE_UNUSED,
void **map_addr ATTRIBUTE_UNUSED,
- bfd_size_type *map_len ATTRIBUTE_UNUSED)
+ size_t *map_len ATTRIBUTE_UNUSED)
{
return (void *)-1;
}