PR 14072
[deliverable/binutils-gdb.git] / bfd / elf64-hppa.c
index d78225b567dce34dd0d135259e9fc17adbf7530d..6087fe55c1864476fd95e83c649d06fdfc4c99e1 100644 (file)
@@ -1,6 +1,7 @@
 /* Support for HPPA 64-bit ELF
    1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-   2010, 2011 Free Software Foundation, Inc.
+   2010, 2011, 2012
+   Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -19,8 +20,8 @@
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
    MA 02110-1301, USA.  */
 
-#include "alloca-conf.h"
 #include "sysdep.h"
+#include "alloca-conf.h"
 #include "bfd.h"
 #include "libbfd.h"
 #include "elf-bfd.h"
@@ -329,9 +330,9 @@ elf64_hppa_object_p (bfd *abfd)
   i_ehdrp = elf_elfheader (abfd);
   if (strcmp (bfd_get_target (abfd), "elf64-hppa-linux") == 0)
     {
-      /* GCC on hppa-linux produces binaries with OSABI=Linux,
+      /* GCC on hppa-linux produces binaries with OSABI=GNU,
         but the kernel produces corefiles with OSABI=SysV.  */
-      if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX
+      if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_GNU
          && i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE) /* aka SYSV */
        return FALSE;
     }
@@ -3272,13 +3273,13 @@ elf_hppa_final_link_relocate (Elf_Internal_Rela *rel,
            && value + addend + max_branch_offset >= 2*max_branch_offset)
          {
            (*_bfd_error_handler)
-             (_("%B(%A+0x%lx): cannot reach %s"),
+             (_("%B(%A+0x" BFD_VMA_FMT "x): cannot reach %s"),
              input_bfd,
              input_section,
              offset,
-             eh->root.root.string);
+             eh ? eh->root.root.string : "unknown");
            bfd_set_error (bfd_error_bad_value);
-           return bfd_reloc_notsupported;
+           return bfd_reloc_overflow;
          }
 
        /* Adjust for any field selectors.  */
@@ -3919,9 +3920,9 @@ elf64_hppa_relocate_section (bfd *output_bfd,
             }
        }
 
-      if (sym_sec != NULL && elf_discarded_section (sym_sec))
+      if (sym_sec != NULL && discarded_section (sym_sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
-                                        rel, relend, howto, contents);
+                                        rel, 1, relend, howto, 0, contents);
 
       if (info->relocatable)
        continue;
@@ -4097,7 +4098,7 @@ const struct elf_size_info hppa64_elf_size_info =
 #undef TARGET_BIG_NAME
 #define TARGET_BIG_NAME                        "elf64-hppa-linux"
 #undef ELF_OSABI
-#define ELF_OSABI                      ELFOSABI_LINUX
+#define ELF_OSABI                      ELFOSABI_GNU
 #undef elf_backend_post_process_headers
 #define elf_backend_post_process_headers _bfd_elf_set_osabi
 #undef elf64_bed
This page took 0.025275 seconds and 4 git commands to generate.