forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -3388,7 +3388,7 @@ dump_relocs_in_section (bfd *abfd,
|
||||
}
|
||||
|
||||
if ((bfd_get_file_flags (abfd) & (BFD_IN_MEMORY | BFD_LINKER_CREATED)) == 0
|
||||
&& relsize > bfd_get_file_size (abfd))
|
||||
&& (ufile_ptr) relsize > bfd_get_file_size (abfd))
|
||||
{
|
||||
printf (" (too many: 0x%x)\n", section->reloc_count);
|
||||
bfd_set_error (bfd_error_file_truncated);
|
||||
|
||||
Reference in New Issue
Block a user