summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-06-28 11:00:13 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-06-28 11:01:21 -0700
commit47fdcf63c04b5c220974affc8ff1d9ef8a041919 (patch)
treeedb5303ef9da47d2786c33f950721cbb70f44d68 /bfd/bfd-in2.h
parentgdb/command.h: Include common/scoped_restore.h (diff)
downloadbinutils-gdb-47fdcf63c04b5c220974affc8ff1d9ef8a041919.tar.gz
binutils-gdb-47fdcf63c04b5c220974affc8ff1d9ef8a041919.tar.bz2
binutils-gdb-47fdcf63c04b5c220974affc8ff1d9ef8a041919.zip
Change bfd_get_size/bfd_get_file_size to ufile_ptr
bfd_get_size and bfd_get_file_size should return the unsigned file size. Otherwise they return negative values for file >= 2GB with 32-bit ufile_ptr. bfd/ * bfd-in2.h: Regenerated. * bfdio.c (bfd_get_size): Change return type to ufile_ptr. (bfd_get_file_size): Likewise. binutils/ * objdump.c (dump_relocs_in_section): Cast to ufile_ptr when comparing against bfd_get_file_size return.
Diffstat (limited to 'bfd/bfd-in2.h')
-rw-r--r--bfd/bfd-in2.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 971acb8e188..1343780c8ce 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1240,9 +1240,9 @@ char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir);
/* Extracted from bfdio.c. */
long bfd_get_mtime (bfd *abfd);
-file_ptr bfd_get_size (bfd *abfd);
+ufile_ptr bfd_get_size (bfd *abfd);
-file_ptr bfd_get_file_size (bfd *abfd);
+ufile_ptr bfd_get_file_size (bfd *abfd);
void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len,
int prot, int flags, file_ptr offset,