This fixes a problem building large (> 2Gb) binaries on 32-bit hosts. Using a
authorMaria Guseva <m.guseva@samsung.com>
Thu, 3 Apr 2014 10:42:05 +0000 (11:42 +0100)
committerNick Clifton <nickc@redhat.com>
Thu, 3 Apr 2014 10:42:05 +0000 (11:42 +0100)
long type instead of long long meant that bfd_seek (SET) could be called with a
negative offset.

PR ld/16803
* elf.c (_bfd_elf_set_section_contents): Use correct type to hold
file position.

bfd/ChangeLog
bfd/elf.c

index 2e9a9fb..86ac6d7 100644 (file)
@@ -1,3 +1,9 @@
+2014-04-03  Maria Guseva  <m.guseva@samsung.com>
+
+       PR ld/16803
+       * elf.c (_bfd_elf_set_section_contents): Use correct type to hold
+       file position.
+
 2014-04-03  Tristan Gingold  <gingold@adacore.com>
 
        * mach-o.c (bfd_mach_o_mangle_symbols): Use index from
index 9e46f7c..3f377d1 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -7800,7 +7800,7 @@ _bfd_elf_set_section_contents (bfd *abfd,
                               bfd_size_type count)
 {
   Elf_Internal_Shdr *hdr;
-  bfd_signed_vma pos;
+  file_ptr pos;
 
   if (! abfd->output_has_begun
       && ! _bfd_elf_compute_section_file_positions (abfd, NULL))