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.
This commit is contained in:
Maria Guseva 2014-04-03 11:42:05 +01:00 committed by Nick Clifton
parent 92b1b67865
commit 1b6aeedbb8
2 changed files with 7 additions and 1 deletions

View 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

View File

@ -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))