aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorMaria Guseva <m.guseva@samsung.com>2014-04-03 11:42:05 +0100
committerNick Clifton <nickc@redhat.com>2014-04-03 11:42:05 +0100
commit1b6aeedbb8e8f6c65d228f0dab3dab522d2517bb (patch)
tree40021a4ccf6c6de698db9d178e4b0efe9749ce71 /bfd
parent92b1b67865c719e83d12578e584ca5e20d172eac (diff)
downloadgdb-1b6aeedbb8e8f6c65d228f0dab3dab522d2517bb.zip
gdb-1b6aeedbb8e8f6c65d228f0dab3dab522d2517bb.tar.gz
gdb-1b6aeedbb8e8f6c65d228f0dab3dab522d2517bb.tar.bz2
This fixes a problem building large (> 2Gb) binaries on 32-bit hosts. Using a
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.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 2e9a9fb..86ac6d7 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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
diff --git a/bfd/elf.c b/bfd/elf.c
index 9e46f7c..3f377d1 100644
--- 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))