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 2e9a9fb60dd80ee84f182f9c8c8a588a647e770a..86ac6d7d534bee598724a07123be03366160e7e3 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 9e46f7c7caaf90c1b7ac36e54146ba148d335d94..3f377d1e9d0a59a69eabbced24d812ab8c003ef6 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))