aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
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/elf.c
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/elf.c')
-rw-r--r--bfd/elf.c2
1 files changed, 1 insertions, 1 deletions
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))