Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / elfcode.h
index f8400659effc445dbdab23bb7e7627be50b06307..1a9d3045124fd9bb3d4c94c3c78f00977234f065 100644 (file)
@@ -1,5 +1,5 @@
 /* ELF executable support for BFD.
-   Copyright (C) 1991-2014 Free Software Foundation, Inc.
+   Copyright (C) 1991-2015 Free Software Foundation, Inc.
 
    Written by Fred Fish @ Cygnus Support, from information published
    in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -1214,10 +1214,9 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic)
       for (isym = isymbuf + 1, sym = symbase; isym < isymend; isym++, sym++)
        {
          memcpy (&sym->internal_elf_sym, isym, sizeof (Elf_Internal_Sym));
-         sym->symbol.the_bfd = abfd;
 
+         sym->symbol.the_bfd = abfd;
          sym->symbol.name = bfd_elf_sym_name (abfd, hdr, isym, NULL);
-
          sym->symbol.value = isym->st_value;
 
          if (isym->st_shndx == SHN_UNDEF)
@@ -1501,7 +1500,9 @@ elf_slurp_reloc_table (bfd *abfd,
       rel_hdr2 = d->rela.hdr;
       reloc_count2 = rel_hdr2 ? NUM_SHDR_ENTRIES (rel_hdr2) : 0;
 
-      BFD_ASSERT (asect->reloc_count == reloc_count + reloc_count2);
+      /* PR 17512: file: 0b4f81b7.  */
+      if (asect->reloc_count != reloc_count + reloc_count2)
+       return FALSE;
       BFD_ASSERT ((rel_hdr && asect->rel_filepos == rel_hdr->sh_offset)
                  || (rel_hdr2 && asect->rel_filepos == rel_hdr2->sh_offset));
 
@@ -1605,7 +1606,7 @@ bfd *
 NAME(_bfd_elf,bfd_from_remote_memory)
   (bfd *templ,
    bfd_vma ehdr_vma,
-   size_t size,
+   bfd_size_type size,
    bfd_vma *loadbasep,
    int (*target_read_memory) (bfd_vma, bfd_byte *, bfd_size_type))
 {
@@ -1749,7 +1750,7 @@ NAME(_bfd_elf,bfd_from_remote_memory)
             headers.  */
        }
       else if (size >= shdr_end)
-       high_offset = shdr_end;
+       high_offset = size;
       else
        {
          bfd_vma page_size = get_elf_backend_data (templ)->minpagesize;
This page took 0.036868 seconds and 4 git commands to generate.