daily update
[binutils-gdb.git] / binutils / elfedit.c
index 1805ec1b5e91c4a78c4e79ca2cc7d6079ac2bd2a..5f213823bd8aec8ee38411f2aa3cbd608d065f09 100644 (file)
@@ -1,6 +1,5 @@
 /* elfedit.c -- Update the ELF header of an ELF format file
-   Copyright 2010
-   Free Software Foundation, Inc.
+   Copyright (C) 2010-2014 Free Software Foundation, Inc.
 
    This file is part of GNU Binutils.
 
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
    02110-1301, USA.  */
 \f
-#include "config.h"
 #include "sysdep.h"
 #include <assert.h>
-#include <sys/stat.h>
 
 #if __GNUC__ >= 2
 /* Define BFD64 here, even if our default architecture is 32 bit ELF
@@ -518,8 +515,8 @@ osabis[] =
   { ELFOSABI_NONE, "none" },
   { ELFOSABI_HPUX, "HPUX" },
   { ELFOSABI_NETBSD, "NetBSD" },
-  { ELFOSABI_LINUX, "Linux" },
-  { ELFOSABI_HURD, "Hurd" },
+  { ELFOSABI_GNU, "GNU" },
+  { ELFOSABI_GNU, "Linux" },
   { ELFOSABI_SOLARIS, "Solaris" },
   { ELFOSABI_AIX, "AIX" },
   { ELFOSABI_IRIX, "Irix" },
@@ -556,6 +553,8 @@ elf_machine (const char *mach)
 {
   if (strcasecmp (mach, "l1om") == 0)
     return EM_L1OM;
+  if (strcasecmp (mach, "k1om") == 0)
+    return EM_K1OM;
   if (strcasecmp (mach, "x86_64") == 0)
     return EM_X86_64;
   if (strcasecmp (mach, "x86-64") == 0)
@@ -576,6 +575,7 @@ elf_class (int mach)
   switch (mach)
     {
     case EM_L1OM:
+    case EM_K1OM:
     case EM_X86_64:
       return ELFCLASS64;
     case EM_NONE: