diff -urpN include/elf.mm/arm.h include/elf/arm.h
--- include/elf.mm/arm.h	2012-09-04 14:53:47.000000000 +0200
+++ include/elf/arm.h	2014-11-24 18:14:54.000000000 +0100
@@ -46,6 +45,11 @@
 #define EF_ARM_MAPSYMSFIRST 0x10	/* NB conflicts with EF_APCS_FLOAT.  */
 #define EF_ARM_EABIMASK      0xFF000000
 
+/* New constants defined in the ARM ELF spec. version XXX.
+   Only valid in conjunction with EF_ARM_EABI_VER5. */
+#define EF_ARM_ABI_FLOAT_SOFT 0x200	/* NB conflicts with EF_ARM_SOFT_FLOAT.  */
+#define EF_ARM_ABI_FLOAT_HARD 0x400	/* NB conflicts with EF_ARM_VFP_FLOAT.  */
+
 /* Constants defined in AAELF.  */
 #define EF_ARM_BE8	    0x00800000
 #define EF_ARM_LE8	    0x00400000
diff -urpN include/elf.mm/avr.h include/elf/avr.h
--- include/elf.mm/avr.h	2012-05-16 16:52:16.000000000 +0200
+++ include/elf/avr.h	2014-11-24 18:14:54.000000000 +0100
@@ -41,13 +40,14 @@
 #define E_AVR_MACH_AVR5     5
 #define E_AVR_MACH_AVR51   51
 #define E_AVR_MACH_AVR6     6 
-#define E_AVR_MACH_XMEGA1 101
-#define E_AVR_MACH_XMEGA2 102
-#define E_AVR_MACH_XMEGA3 103
-#define E_AVR_MACH_XMEGA4 104
-#define E_AVR_MACH_XMEGA5 105
-#define E_AVR_MACH_XMEGA6 106
-#define E_AVR_MACH_XMEGA7 107
+#define E_AVR_MACH_AVRTINY 100
+#define E_AVR_MACH_XMEGA1  101
+#define E_AVR_MACH_XMEGA2  102
+#define E_AVR_MACH_XMEGA3  103
+#define E_AVR_MACH_XMEGA4  104
+#define E_AVR_MACH_XMEGA5  105
+#define E_AVR_MACH_XMEGA6  106
+#define E_AVR_MACH_XMEGA7  107
 
 /* Relocations.  */
 START_RELOC_NUMBERS (elf_avr_reloc_type)
@@ -81,6 +81,12 @@ START_RELOC_NUMBERS (elf_avr_reloc_type)
      RELOC_NUMBER (R_AVR_8_LO8,                27)
      RELOC_NUMBER (R_AVR_8_HI8,                28)
      RELOC_NUMBER (R_AVR_8_HLO8,               29)
+     RELOC_NUMBER (R_AVR_DIFF8,                30)
+     RELOC_NUMBER (R_AVR_DIFF16,               31)
+     RELOC_NUMBER (R_AVR_DIFF32,               32)
+     RELOC_NUMBER (R_AVR_LDS_STS_16,           33)
+     RELOC_NUMBER (R_AVR_PORT6,                34)
+     RELOC_NUMBER (R_AVR_PORT5,                35)
 END_RELOC_NUMBERS (R_AVR_max)
 
 #endif /* _ELF_AVR_H */
diff -urpN include/elf.mm/common.h include/elf/common.h
--- include/elf.mm/common.h	2012-09-04 14:53:47.000000000 +0200
+++ include/elf/common.h	2014-11-24 18:14:54.000000000 +0100
@@ -194,7 +192,7 @@
 #define EM_MN10300	 89	/* Matsushita MN10300 */
 #define EM_MN10200	 90	/* Matsushita MN10200 */
 #define EM_PJ		 91	/* picoJava */
-#define EM_OPENRISC	 92	/* OpenRISC 32-bit embedded processor */
+#define EM_OR1K		 92	/* OpenRISC 1000 32-bit embedded processor */
 #define EM_ARC_A5	 93	/* ARC Cores Tangent-A5 */
 #define EM_XTENSA	 94	/* Tensilica Xtensa Architecture */
 #define EM_VIDEOCORE	 95	/* Alphamosaic VideoCore processor */
@@ -278,7 +276,7 @@
 #define EM_MANIK	171	/* M2000 Reconfigurable RISC Microprocessor */
 #define EM_CRAYNV2	172	/* Cray Inc. NV2 vector architecture */
 #define EM_RX		173	/* Renesas RX family */
-#define EM_METAG	174	/* Imagination Technologies META processor architecture */
+#define EM_METAG	174	/* Imagination Technologies Meta processor architecture */
 #define EM_MCST_ELBRUS	175	/* MCST Elbrus general purpose hardware architecture */
 #define EM_ECOG16	176	/* Cyan Technology eCOG16 family */
 #define EM_CR16		177	/* National Semiconductor CompactRISC 16-bit processor */
@@ -298,6 +296,11 @@
 #define EM_TILEGX	191	/* Tilera TILE-Gx multicore architecture family */
 #define EM_RL78		197	/* Renesas RL78 family.  */
 #define EM_78K0R	199	/* Renesas 78K0R.  */
+#define EM_INTEL205	205	/* Reserved by Intel */
+#define EM_INTEL206	206	/* Reserved by Intel */
+#define EM_INTEL207	207	/* Reserved by Intel */
+#define EM_INTEL208	208	/* Reserved by Intel */
+#define EM_INTEL209	209	/* Reserved by Intel */
 
 /* If it is necessary to assign new unofficial EM_* values, please pick large
    random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
@@ -405,6 +402,9 @@
 
 #define EM_ADAPTEVA_EPIPHANY   0x1223  /* Adapteva's Epiphany architecture.  */
 
+/* Old constant that might be in use by some software. */
+#define EM_OPENRISC		EM_OR1K
+
 /* See the above comment before you add a new EM_* value here.  */
 
 /* Values for e_version.  */
@@ -529,6 +529,10 @@
 					/*   note name must be "LINUX".  */
 #define NT_PPC_VSX	0x102		/* PowerPC VSX registers */
 					/*   note name must be "LINUX".  */
+#define NT_386_TLS	0x200		/* x86 TLS information */
+					/*   note name must be "LINUX".  */
+#define NT_386_IOPERM	0x201		/* x86 io permissions */
+					/*   note name must be "LINUX".  */
 #define NT_X86_XSTATE	0x202		/* x86 XSAVE extended state */
 					/*   note name must be "LINUX".  */
 #define NT_S390_HIGH_GPRS 0x300		/* S/390 upper halves of GPRs  */
@@ -547,8 +551,19 @@
 					/*   note name must be "LINUX".  */
 #define NT_S390_SYSTEM_CALL     0x307   /* S390 system call restart data */
 					/*   note name must be "LINUX".  */
+#define NT_S390_TDB	0x308		/* S390 transaction diagnostic block */
+					/*   note name must be "LINUX".  */
 #define NT_ARM_VFP	0x400		/* ARM VFP registers */
+/* The following definitions should really use NT_AARCH_..., but defined
+   this way for compatibility with Linux.  */
+#define NT_ARM_TLS	0x401		/* AArch TLS registers */
+					/*   note name must be "LINUX".  */
+#define NT_ARM_HW_BREAK	0x402		/* AArch hardware breakpoint registers */
+					/*   note name must be "LINUX".  */
+#define NT_ARM_HW_WATCH	0x403		/* AArch hardware watchpoint registers */
 					/*   note name must be "LINUX".  */
+#define NT_SIGINFO	0x53494749	/* Fields of siginfo_t.  */
+#define NT_FILE		0x46494c45	/* Description of mapped files.  */
 
 /* Note segments for core files on dir-style procfs systems.  */
 
@@ -820,7 +835,19 @@
 #define DF_1_INTERPOSE	0x00000400
 #define DF_1_NODEFLIB	0x00000800
 #define DF_1_NODUMP	0x00001000
-#define DF_1_CONLFAT	0x00002000
+#define DF_1_CONFALT	0x00002000
+#define DF_1_ENDFILTEE	0x00004000
+#define	DF_1_DISPRELDNE	0x00008000
+#define	DF_1_DISPRELPND	0x00010000
+#define	DF_1_NODIRECT	0x00020000
+#define	DF_1_IGNMULDEF	0x00040000
+#define	DF_1_NOKSYMS	0x00080000
+#define	DF_1_NOHDR	0x00100000
+#define	DF_1_EDITED	0x00200000
+#define	DF_1_NORELOC	0x00400000
+#define	DF_1_SYMINTPOSE	0x00800000
+#define	DF_1_GLOBAUDIT	0x01000000
+#define	DF_1_SINGLETON	0x02000000
 
 /* Flag values for the DT_FLAGS entry.	*/
 #define DF_ORIGIN	(1 << 0)
@@ -929,6 +956,7 @@
 #define AT_BASE_PLATFORM 24		/* String identifying real platform,
 					   may differ from AT_PLATFORM.  */
 #define AT_RANDOM	25		/* Address of 16 random bytes.  */
+#define AT_HWCAP2	26		/* Extension of AT_HWCAP.  */
 #define AT_EXECFN	31		/* Filename of executable.  */
 /* Pointer to the global system page used for system calls and other
    nice things.  */
diff -urpN include/elf.mm/h8.h include/elf/h8.h
--- include/elf.mm/h8.h	2010-04-15 12:26:08.000000000 +0200
+++ include/elf/h8.h	2014-11-24 18:14:54.000000000 +0100
@@ -23,7 +23,7 @@
 #include "elf/reloc-macros.h"
 
 /* Relocations.  */
-/* Relocations 59..63 are GNU extensions.  */
+/* Relocations 59..64 are GNU extensions.  */
 START_RELOC_NUMBERS (elf_h8_reloc_type)
   RELOC_NUMBER (R_H8_NONE, 0)
   RELOC_NUMBER (R_H8_DIR32, 1)
@@ -65,6 +65,7 @@ START_RELOC_NUMBERS (elf_h8_reloc_type)
   RELOC_NUMBER (R_H8_DIR24A8, 61)
   RELOC_NUMBER (R_H8_DIR24R8, 62)
   RELOC_NUMBER (R_H8_DIR32A16, 63)
+  RELOC_NUMBER (R_H8_DISP32A16, 64)
   RELOC_NUMBER (R_H8_ABS32, 65)
   RELOC_NUMBER (R_H8_ABS32A16, 127)
   RELOC_NUMBER (R_H8_SYM, 128)
diff -urpN include/elf.mm/i386.h include/elf/i386.h
--- include/elf.mm/i386.h	2010-04-15 12:26:08.000000000 +0200
+++ include/elf/i386.h	2014-11-24 18:14:54.000000000 +0100
@@ -62,7 +61,7 @@ START_RELOC_NUMBERS (elf_i386_reloc_type
      RELOC_NUMBER (R_386_TLS_DTPMOD32, 35)
      RELOC_NUMBER (R_386_TLS_DTPOFF32, 36)
      RELOC_NUMBER (R_386_TLS_TPOFF32,  37)
-/* 38 */
+     RELOC_NUMBER (R_386_SIZE32,       38) /* 32-bit symbol size */
      RELOC_NUMBER (R_386_TLS_GOTDESC,  39)
      RELOC_NUMBER (R_386_TLS_DESC_CALL,40)
      RELOC_NUMBER (R_386_TLS_DESC,     41)
diff -urpN include/elf.mm/ia64.h include/elf/ia64.h
--- include/elf.mm/ia64.h	2011-06-09 10:53:05.000000000 +0200
+++ include/elf/ia64.h	2014-11-24 18:14:54.000000000 +0100
@@ -209,6 +208,10 @@
 # define VMS_STL_STD	   2	  /* Standard linkage with return value.  */
 # define VMS_STL_LNK	   3	  /* Explicit represented in .vms_linkages.  */
 
+/* OpenVMS specific symbol binding values.  */
+#define STB_VMS_WEAK	11	/* VMS weak symbol.  */
+#define STB_VMS_SYSTEM	12	/* System symbol.  */
+
 /* OpenVMS specific fixup and relocation structures.  */
 
 typedef struct
diff -urpN include/elf.mm/metag.h include/elf/metag.h
--- include/elf.mm/metag.h	1970-01-01 01:00:00.000000000 +0100
+++ include/elf/metag.h	2014-11-24 18:14:54.000000000 +0100
@@ -0,0 +1,91 @@
+/* Meta ELF support for BFD.
+   Copyright (C) 2013-2014 Free Software Foundation, Inc.
+   Contributed by Imagination Technologies Ltd.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _ELF_METAG_H
+#define _ELF_METAG_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocation types.  */
+
+START_RELOC_NUMBERS (elf_metag_reloc_type)
+     RELOC_NUMBER (R_METAG_HIADDR16,      0)
+     RELOC_NUMBER (R_METAG_LOADDR16,      1)
+     RELOC_NUMBER (R_METAG_ADDR32,        2)
+     RELOC_NUMBER (R_METAG_NONE,          3)
+     RELOC_NUMBER (R_METAG_RELBRANCH,     4)
+     RELOC_NUMBER (R_METAG_GETSETOFF,     5)
+
+     /* Backward compatability */
+     RELOC_NUMBER (R_METAG_REG32OP1,      6)
+     RELOC_NUMBER (R_METAG_REG32OP2,      7)
+     RELOC_NUMBER (R_METAG_REG32OP3,      8)
+     RELOC_NUMBER (R_METAG_REG16OP1,      9)
+     RELOC_NUMBER (R_METAG_REG16OP2,     10)
+     RELOC_NUMBER (R_METAG_REG16OP3,     11)
+     RELOC_NUMBER (R_METAG_REG32OP4,     12)
+
+     RELOC_NUMBER (R_METAG_HIOG,         13)
+     RELOC_NUMBER (R_METAG_LOOG,         14)
+
+     RELOC_NUMBER (R_METAG_REL8,         15)
+     RELOC_NUMBER (R_METAG_REL16,        16)
+
+     /* GNU */
+     RELOC_NUMBER (R_METAG_GNU_VTINHERIT,30)
+     RELOC_NUMBER (R_METAG_GNU_VTENTRY,  31)
+
+     /* PIC relocations */
+     RELOC_NUMBER (R_METAG_HI16_GOTOFF,  32)
+     RELOC_NUMBER (R_METAG_LO16_GOTOFF,  33)
+     RELOC_NUMBER (R_METAG_GETSET_GOTOFF,34)
+     RELOC_NUMBER (R_METAG_GETSET_GOT,   35)
+     RELOC_NUMBER (R_METAG_HI16_GOTPC,   36)
+     RELOC_NUMBER (R_METAG_LO16_GOTPC,   37)
+     RELOC_NUMBER (R_METAG_HI16_PLT,     38)
+     RELOC_NUMBER (R_METAG_LO16_PLT,     39)
+     RELOC_NUMBER (R_METAG_RELBRANCH_PLT,40)
+     RELOC_NUMBER (R_METAG_GOTOFF,       41)
+     RELOC_NUMBER (R_METAG_PLT,          42)
+     RELOC_NUMBER (R_METAG_COPY,         43)
+     RELOC_NUMBER (R_METAG_JMP_SLOT,     44)
+     RELOC_NUMBER (R_METAG_RELATIVE,     45)
+     RELOC_NUMBER (R_METAG_GLOB_DAT,     46)
+
+     /* TLS relocations */
+     RELOC_NUMBER (R_METAG_TLS_GD,       47)
+     RELOC_NUMBER (R_METAG_TLS_LDM,      48)
+     RELOC_NUMBER (R_METAG_TLS_LDO_HI16, 49)
+     RELOC_NUMBER (R_METAG_TLS_LDO_LO16, 50)
+     RELOC_NUMBER (R_METAG_TLS_LDO,      51)
+     RELOC_NUMBER (R_METAG_TLS_IE,       52)
+     RELOC_NUMBER (R_METAG_TLS_IENONPIC, 53)
+     RELOC_NUMBER (R_METAG_TLS_IENONPIC_HI16,54)
+     RELOC_NUMBER (R_METAG_TLS_IENONPIC_LO16,55)
+     RELOC_NUMBER (R_METAG_TLS_TPOFF,    56)
+     RELOC_NUMBER (R_METAG_TLS_DTPMOD,   57)
+     RELOC_NUMBER (R_METAG_TLS_DTPOFF,   58)
+     RELOC_NUMBER (R_METAG_TLS_LE,       59)
+     RELOC_NUMBER (R_METAG_TLS_LE_HI16,  60)
+     RELOC_NUMBER (R_METAG_TLS_LE_LO16,  61)
+
+END_RELOC_NUMBERS (R_METAG_MAX)
+
+#endif /* _ELF_METAG_H */
diff -urpN include/elf.mm/microblaze.h include/elf/microblaze.h
--- include/elf.mm/microblaze.h	2010-04-15 12:26:08.000000000 +0200
+++ include/elf/microblaze.h	2014-11-24 18:14:54.000000000 +0100
@@ -50,6 +50,14 @@ START_RELOC_NUMBERS (elf_microblaze_relo
   RELOC_NUMBER (R_MICROBLAZE_GOTOFF_64, 19) /* Offset relative to GOT.  */
   RELOC_NUMBER (R_MICROBLAZE_GOTOFF_32, 20) /* Offset relative to GOT.  */
   RELOC_NUMBER (R_MICROBLAZE_COPY, 21)      /* Runtime copy.  */
+  RELOC_NUMBER (R_MICROBLAZE_TLS, 22)           /* TLS Reloc */
+  RELOC_NUMBER (R_MICROBLAZE_TLSGD, 23)         /* TLS General Dynamic */
+  RELOC_NUMBER (R_MICROBLAZE_TLSLD, 24)         /* TLS Local Dynamic */
+  RELOC_NUMBER (R_MICROBLAZE_TLSDTPMOD32, 25)   /* TLS Module ID */
+  RELOC_NUMBER (R_MICROBLAZE_TLSDTPREL32, 26)   /* TLS Offset Within TLS Block */
+  RELOC_NUMBER (R_MICROBLAZE_TLSDTPREL64, 27)   /* TLS Offset Within TLS Block */
+  RELOC_NUMBER (R_MICROBLAZE_TLSGOTTPREL32, 28) /* TLS Offset From Thread Pointer */
+  RELOC_NUMBER (R_MICROBLAZE_TLSTPREL32, 29)    /* TLS Offset From Thread Pointer */
    
 END_RELOC_NUMBERS (R_MICROBLAZE_max)
 
diff -urpN include/elf.mm/mips.h include/elf/mips.h
--- include/elf.mm/mips.h	2011-12-19 08:58:02.000000000 +0100
+++ include/elf/mips.h	2014-11-24 18:14:54.000000000 +0100
@@ -89,7 +87,14 @@ START_RELOC_NUMBERS (elf_mips_reloc_type
   RELOC_NUMBER (R_MIPS_TLS_TPREL_HI16, 49)
   RELOC_NUMBER (R_MIPS_TLS_TPREL_LO16, 50)
   RELOC_NUMBER (R_MIPS_GLOB_DAT, 51)
-  FAKE_RELOC (R_MIPS_max, 52)
+  /* Space to grow */
+  RELOC_NUMBER (R_MIPS_PC21_S2, 60)
+  RELOC_NUMBER (R_MIPS_PC26_S2, 61)
+  RELOC_NUMBER (R_MIPS_PC18_S3, 62)
+  RELOC_NUMBER (R_MIPS_PC19_S2, 63)
+  RELOC_NUMBER (R_MIPS_PCHI16, 64)
+  RELOC_NUMBER (R_MIPS_PCLO16, 65)
+  FAKE_RELOC (R_MIPS_max, 66)
   /* These relocs are used for the mips16.  */
   FAKE_RELOC (R_MIPS16_min, 100)
   RELOC_NUMBER (R_MIPS16_26, 100)
@@ -152,10 +157,10 @@ START_RELOC_NUMBERS (elf_mips_reloc_type
   FAKE_RELOC (R_MICROMIPS_max, 174)
 
   /* This was a GNU extension used by embedded-PIC.  It was co-opted by
-     mips-linux for exception-handling data.  It is no longer used, but
-     should continue to be supported by the linker for backward
-     compatibility.  (GCC stopped using it in May, 2004.)  */
+     mips-linux for exception-handling data.  GCC stopped using it in
+     May, 2004, then started using it again for compact unwind tables.  */
   RELOC_NUMBER (R_MIPS_PC32, 248)
+  RELOC_NUMBER (R_MIPS_EH, 249)
   /* FIXME: this relocation is used internally by gas.  */
   RELOC_NUMBER (R_MIPS_GNU_REL16_S2, 250)
   /* These are GNU extensions to enable C++ vtable garbage collection.  */
@@ -187,6 +192,16 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
 /* Process the .MIPS.options section first by ld */
 #define EF_MIPS_OPTIONS_FIRST	0x00000080
 
+/* Indicates code compiled for a 64-bit machine in 32-bit mode
+   (regs are 32-bits wide).  */
+#define EF_MIPS_32BITMODE	0x00000100
+
+/* 32-bit machine but FP registers are 64 bit (-mfp64).  */
+#define EF_MIPS_FP64		0x00000200
+
+/* Code in file uses the IEEE 754-2008 NaN encoding convention.  */
+#define EF_MIPS_NAN2008		0x00000400
+
 /* Architectural Extensions used by this file */
 #define EF_MIPS_ARCH_ASE	0x0f000000
 
@@ -199,10 +214,6 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
 /* Use MICROMIPS ISA extensions.  */
 #define EF_MIPS_ARCH_ASE_MICROMIPS	0x02000000
 
-/* Indicates code compiled for a 64-bit machine in 32-bit mode.
-   (regs are 32-bits wide.) */
-#define EF_MIPS_32BITMODE       0x00000100
-
 /* Four bit MIPS architecture field.  */
 #define EF_MIPS_ARCH		0xf0000000
 
@@ -233,6 +244,12 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
 /* -mips64r2 code.  */
 #define E_MIPS_ARCH_64R2        0x80000000
 
+/* -mips32r6 code.  */
+#define E_MIPS_ARCH_32R6        0x90000000
+
+/* -mips64r6 code.  */
+#define E_MIPS_ARCH_64R6        0xa0000000
+
 /* The ABI of the file.  Also see EF_MIPS_ABI2 above. */
 #define EF_MIPS_ABI		0x0000F000
 
@@ -269,7 +286,9 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
 #define E_MIPS_MACH_OCTEON	0x008b0000
 #define E_MIPS_MACH_XLR     	0x008c0000
 #define E_MIPS_MACH_OCTEON2	0x008d0000
+#define E_MIPS_MACH_OCTEON3	0x008e0000
 #define E_MIPS_MACH_5400	0x00910000
+#define E_MIPS_MACH_5900	0x00920000
 #define E_MIPS_MACH_5500	0x00980000
 #define E_MIPS_MACH_9000	0x00990000
 #define E_MIPS_MACH_LS2E        0x00A00000
@@ -422,6 +441,8 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
 /* Runtime procedure descriptor table exception information (ucode) ??? */
 #define SHT_MIPS_PDR_EXCEPTION	0x70000029
 
+/* ABI related flags section.  */
+#define SHT_MIPS_ABIFLAGS	0x7000002a
 
 /* A section of type SHT_MIPS_LIBLIST contains an array of the
    following structure.  The sh_link field is the section index of the
@@ -587,6 +608,9 @@ extern void bfd_mips_elf32_swap_reginfo_
 
 /* .MIPS.options section.  */
 #define PT_MIPS_OPTIONS		0x70000002
+
+/* Records ABI related flags.  */
+#define PT_MIPS_ABIFLAGS	0x70000003
 
 /* Processor specific dynamic array tags.  */
 
@@ -802,15 +826,24 @@ extern void bfd_mips_elf32_swap_reginfo_
    PLT entries and traditional MIPS lazy binding stubs.  We mark the former
    with STO_MIPS_PLT to distinguish them from the latter.  */
 #define STO_MIPS_PLT		0x8
-#define ELF_ST_IS_MIPS_PLT(other) (((other) & STO_MIPS_FLAGS) == STO_MIPS_PLT)
-#define ELF_ST_SET_MIPS_PLT(other) (((other) & ~STO_MIPS_FLAGS) | STO_MIPS_PLT)
+#define ELF_ST_IS_MIPS_PLT(other)					\
+  ((ELF_ST_IS_MIPS16 (other)						\
+    ? ((other) & (~STO_MIPS16 & STO_MIPS_FLAGS))			\
+    : ((other) & STO_MIPS_FLAGS)) == STO_MIPS_PLT)
+#define ELF_ST_SET_MIPS_PLT(other)					\
+  ((ELF_ST_IS_MIPS16 (other)						\
+    ? ((other) & (STO_MIPS16 | ~STO_MIPS_FLAGS))			\
+    : ((other) & ~STO_MIPS_FLAGS)) | STO_MIPS_PLT)
 
 /* This value is used to mark PIC functions in an object that mixes
    PIC and non-PIC.  Note that this bit overlaps with STO_MIPS16,
    although MIPS16 symbols are never considered to be MIPS_PIC.  */
 #define STO_MIPS_PIC		0x20
 #define ELF_ST_IS_MIPS_PIC(other) (((other) & STO_MIPS_FLAGS) == STO_MIPS_PIC)
-#define ELF_ST_SET_MIPS_PIC(other) (((other) & ~STO_MIPS_FLAGS) | STO_MIPS_PIC)
+#define ELF_ST_SET_MIPS_PIC(other)					\
+  ((ELF_ST_IS_MIPS16 (other)						\
+    ? ((other) & ~(STO_MIPS16 | STO_MIPS_FLAGS))			\
+    : ((other) & ~STO_MIPS_FLAGS)) | STO_MIPS_PIC)
 
 /* This value is used for a mips16 .text symbol.  */
 #define STO_MIPS16		0xf0
@@ -1033,6 +1066,58 @@ typedef struct
   bfd_vma ri_gp_value;
 } Elf64_Internal_RegInfo;
 
+/* ABI Flags structure version 0.  */
+
+typedef struct
+{
+  /* Version of flags structure.  */
+  unsigned char version[2];
+  /* The level of the ISA: 1-5, 32, 64.  */
+  unsigned char isa_level[1];
+  /* The revision of ISA: 0 for MIPS V and below, 1-n otherwise.  */
+  unsigned char isa_rev[1];
+  /* The size of general purpose registers.  */
+  unsigned char gpr_size[1];
+  /* The size of co-processor 1 registers.  */
+  unsigned char cpr1_size[1];
+  /* The size of co-processor 2 registers.  */
+  unsigned char cpr2_size[1];
+  /* The floating-point ABI.  */
+  unsigned char fp_abi[1];
+  /* Processor-specific extension.  */
+  unsigned char isa_ext[4];
+  /* Mask of ASEs used.  */
+  unsigned char ases[4];
+  /* Mask of general flags.  */
+  unsigned char flags1[4];
+  unsigned char flags2[4];
+} Elf_External_ABIFlags_v0;
+
+typedef struct
+{
+  /* Version of flags structure.  */
+  unsigned short version;
+  /* The level of the ISA: 1-5, 32, 64.  */
+  unsigned char isa_level;
+  /* The revision of ISA: 0 for MIPS V and below, 1-n otherwise.  */
+  unsigned char isa_rev;
+  /* The size of general purpose registers.  */
+  unsigned char gpr_size;
+  /* The size of co-processor 1 registers.  */
+  unsigned char cpr1_size;
+  /* The size of co-processor 2 registers.  */
+  unsigned char cpr2_size;
+  /* The floating-point ABI.  */
+  unsigned char fp_abi;
+  /* Processor-specific extension.  */
+  unsigned long isa_ext;
+  /* Mask of ASEs used.  */
+  unsigned long ases;
+  /* Mask of general flags.  */
+  unsigned long flags1;
+  unsigned long flags2;
+} Elf_Internal_ABIFlags_v0;
+
 typedef struct
 {
   /* The hash value computed from the name of the corresponding
@@ -1073,6 +1158,12 @@ extern void bfd_mips_elf64_swap_reginfo_
 extern void bfd_mips_elf64_swap_reginfo_out
   (bfd *, const Elf64_Internal_RegInfo *, Elf64_External_RegInfo *);
 
+/* MIPS ELF flags swapping routines.  */
+extern void bfd_mips_elf_swap_abiflags_v0_in
+  (bfd *, const Elf_External_ABIFlags_v0 *, Elf_Internal_ABIFlags_v0 *);
+extern void bfd_mips_elf_swap_abiflags_v0_out
+  (bfd *, const Elf_Internal_ABIFlags_v0 *, Elf_External_ABIFlags_v0 *);
+
 /* Masks for the info work of an ODK_EXCEPTIONS descriptor.  */
 #define OEX_FPU_MIN	0x1f	/* FPEs which must be enabled.  */
 #define OEX_FPU_MAX	0x1f00	/* FPEs which may be enabled.  */
@@ -1110,17 +1201,107 @@ extern void bfd_mips_elf64_swap_reginfo_
 /* Masks for the info word of an ODK_HWAND/ODK_HWOR descriptor.  */
 #define OHWA0_R4KEOP_CHECKED	0x00000001
 #define OHWA0_R4KEOP_CLEAN	0x00000002
+
+/* Values for the xxx_size bytes of an ABI flags structure.  */
+
+#define AFL_REG_NONE	     0x00	/* No registers.  */
+#define AFL_REG_32	     0x01	/* 32-bit registers.  */
+#define AFL_REG_64	     0x02	/* 64-bit registers.  */
+#define AFL_REG_128	     0x03	/* 128-bit registers.  */
+
+/* Masks for the ases word of an ABI flags structure.  */
+
+#define AFL_ASE_DSP          0x00000001 /* DSP ASE.  */
+#define AFL_ASE_DSPR2        0x00000002 /* DSP R2 ASE.  */
+#define AFL_ASE_EVA          0x00000004 /* Enhanced VA Scheme.  */
+#define AFL_ASE_MCU          0x00000008 /* MCU (MicroController) ASE.  */
+#define AFL_ASE_MDMX         0x00000010 /* MDMX ASE.  */
+#define AFL_ASE_MIPS3D       0x00000020 /* MIPS-3D ASE.  */
+#define AFL_ASE_MT           0x00000040 /* MT ASE.  */
+#define AFL_ASE_SMARTMIPS    0x00000080 /* SmartMIPS ASE.  */
+#define AFL_ASE_VIRT         0x00000100 /* VZ ASE.  */
+#define AFL_ASE_MSA          0x00000200 /* MSA ASE.  */
+#define AFL_ASE_MIPS16       0x00000400 /* MIPS16 ASE.  */
+#define AFL_ASE_MICROMIPS    0x00000800 /* MICROMIPS ASE.  */
+#define AFL_ASE_XPA          0x00001000 /* XPA ASE.  */
+#define AFL_ASE_MASK         0x00001fff /* All ASEs.  */
+
+/* Values for the isa_ext word of an ABI flags structure.  */
+
+#define AFL_EXT_XLR           1  /* RMI Xlr instruction.  */
+#define AFL_EXT_OCTEON2       2  /* Cavium Networks Octeon2.  */
+#define AFL_EXT_OCTEONP       3  /* Cavium Networks OcteonP.  */
+#define AFL_EXT_LOONGSON_3A   4  /* Loongson 3A.  */
+#define AFL_EXT_OCTEON        5  /* Cavium Networks Octeon.  */
+#define AFL_EXT_5900          6  /* MIPS R5900 instruction.  */
+#define AFL_EXT_4650          7  /* MIPS R4650 instruction.  */
+#define AFL_EXT_4010          8  /* LSI R4010 instruction.  */
+#define AFL_EXT_4100          9  /* NEC VR4100 instruction.  */
+#define AFL_EXT_3900         10  /* Toshiba R3900 instruction.  */
+#define AFL_EXT_10000        11  /* MIPS R10000 instruction.  */
+#define AFL_EXT_SB1          12  /* Broadcom SB-1 instruction.  */
+#define AFL_EXT_4111         13  /* NEC VR4111/VR4181 instruction.  */
+#define AFL_EXT_4120         14  /* NEC VR4120 instruction.  */
+#define AFL_EXT_5400         15  /* NEC VR5400 instruction.  */
+#define AFL_EXT_5500         16  /* NEC VR5500 instruction.  */
+#define AFL_EXT_LOONGSON_2E  17  /* ST Microelectronics Loongson 2E.  */
+#define AFL_EXT_LOONGSON_2F  18  /* ST Microelectronics Loongson 2F.  */
+#define AFL_EXT_OCTEON3      19  /* Cavium Networks Octeon3.  */
+
+/* Masks for the flags1 word of an ABI flags structure.  */
+#define AFL_FLAGS1_ODDSPREG   1	 /* Uses odd single-precision registers.  */
+
+extern unsigned int bfd_mips_isa_ext (bfd *);
 
 
 /* Object attribute tags.  */
 enum
 {
   /* 0-3 are generic.  */
-  Tag_GNU_MIPS_ABI_FP = 4, /* Value 1 for hard-float -mdouble-float, 2
-			      for hard-float -msingle-float, 3 for
-			      soft-float, 4 for -mips32r2 -mfp64; 0 for
-			      not tagged or not using any ABIs affected
-			      by the differences.  */
+
+  /* Floating-point ABI used by this object file.  */
+  Tag_GNU_MIPS_ABI_FP = 4,
+
+  /* MSA ABI used by this object file.  */
+  Tag_GNU_MIPS_ABI_MSA = 8,
+};
+
+/* Object attribute values.  */
+enum
+{
+  /* Values defined for Tag_GNU_MIPS_ABI_FP.  */
+
+  /* Not tagged or not using any ABIs affected by the differences.  */
+  Val_GNU_MIPS_ABI_FP_ANY = 0,
+
+  /* Using hard-float -mdouble-float.  */
+  Val_GNU_MIPS_ABI_FP_DOUBLE = 1,
+
+  /* Using hard-float -msingle-float.  */
+  Val_GNU_MIPS_ABI_FP_SINGLE = 2,
+
+  /* Using soft-float.  */
+  Val_GNU_MIPS_ABI_FP_SOFT = 3,
+
+  /* Using -mips32r2 -mfp64.  */
+  Val_GNU_MIPS_ABI_FP_OLD_64 = 4,
+
+  /* Using -mfpxx */
+  Val_GNU_MIPS_ABI_FP_XX = 5,
+
+  /* Using -mips32r2 -mfp64.  */
+  Val_GNU_MIPS_ABI_FP_64 = 6,
+
+  /* Using -mips32r2 -mfp64 -mno-odd-spreg.  */
+  Val_GNU_MIPS_ABI_FP_64A = 7,
+
+  /* Values defined for Tag_GNU_MIPS_ABI_MSA.  */
+
+  /* Not tagged or not using any ABIs affected by the differences.  */
+  Val_GNU_MIPS_ABI_MSA_ANY = 0,
+
+  /* Using 128-bit MSA.  */
+  Val_GNU_MIPS_ABI_MSA_128 = 1,
 };
 
 #endif /* _ELF_MIPS_H */
diff -urpN include/elf.mm/msp430.h include/elf/msp430.h
--- include/elf.mm/msp430.h	2010-04-15 12:26:08.000000000 +0200
+++ include/elf/msp430.h	2014-11-24 18:14:54.000000000 +0100
@@ -33,6 +33,11 @@
 #define E_MSP430_MACH_MSP430x14  14
 #define E_MSP430_MACH_MSP430x15  15
 #define E_MSP430_MACH_MSP430x16  16
+#define E_MSP430_MACH_MSP430x20  20
+#define E_MSP430_MACH_MSP430x22  22
+#define E_MSP430_MACH_MSP430x23  23
+#define E_MSP430_MACH_MSP430x24  24
+#define E_MSP430_MACH_MSP430x26  26
 #define E_MSP430_MACH_MSP430x31  31
 #define E_MSP430_MACH_MSP430x32  32
 #define E_MSP430_MACH_MSP430x33  33
@@ -40,6 +45,19 @@
 #define E_MSP430_MACH_MSP430x42  42
 #define E_MSP430_MACH_MSP430x43  43
 #define E_MSP430_MACH_MSP430x44  44
+#define E_MSP430_MACH_MSP430X    45
+#define E_MSP430_MACH_MSP430x46  46
+#define E_MSP430_MACH_MSP430x47  47
+#define E_MSP430_MACH_MSP430x54  54
+
+#define SHT_MSP430_ATTRIBUTES	0x70000003	/* Section holds ABI attributes.  */
+#define SHT_MSP430_SEC_FLAGS	0x7f000005	/* Holds TI compiler's section flags.  */
+#define SHT_MSP430_SYM_ALIASES	0x7f000006	/* Holds TI compiler's symbol aliases.  */
+
+/* Tag values for an attribute section.  */
+#define OFBA_MSPABI_Tag_ISA		4
+#define OFBA_MSPABI_Tag_Code_Model	6
+#define OFBA_MSPABI_Tag_Data_Model	8
 
 /* Relocations.  */
 START_RELOC_NUMBERS (elf_msp430_reloc_type)
@@ -52,7 +70,32 @@ START_RELOC_NUMBERS (elf_msp430_reloc_ty
      RELOC_NUMBER (R_MSP430_16_PCREL_BYTE, 	6)
      RELOC_NUMBER (R_MSP430_2X_PCREL,		7)
      RELOC_NUMBER (R_MSP430_RL_PCREL,		8)
-
+     RELOC_NUMBER (R_MSP430_8,			9)
+     RELOC_NUMBER (R_MSP430_SYM_DIFF,		10)
 END_RELOC_NUMBERS (R_MSP430_max)
 
+START_RELOC_NUMBERS (elf_msp430x_reloc_type)
+     RELOC_NUMBER (R_MSP430_ABS32, 1)		/* aka R_MSP430_32 */
+     RELOC_NUMBER (R_MSP430_ABS16, 2)		/* aka R_MSP430_16 */
+     RELOC_NUMBER (R_MSP430_ABS8, 3)
+     RELOC_NUMBER (R_MSP430_PCR16, 4)		/* aka R_MSP430_16_PCREL */
+     RELOC_NUMBER (R_MSP430X_PCR20_EXT_SRC, 5)
+     RELOC_NUMBER (R_MSP430X_PCR20_EXT_DST, 6)
+     RELOC_NUMBER (R_MSP430X_PCR20_EXT_ODST, 7)
+     RELOC_NUMBER (R_MSP430X_ABS20_EXT_SRC, 8)
+     RELOC_NUMBER (R_MSP430X_ABS20_EXT_DST, 9)
+     RELOC_NUMBER (R_MSP430X_ABS20_EXT_ODST, 10)
+     RELOC_NUMBER (R_MSP430X_ABS20_ADR_SRC, 11)
+     RELOC_NUMBER (R_MSP430X_ABS20_ADR_DST, 12)
+     RELOC_NUMBER (R_MSP430X_PCR16, 13)		/* Like R_MSP430_PCR16 but with overflow checking.  */
+     RELOC_NUMBER (R_MSP430X_PCR20_CALL, 14)
+     RELOC_NUMBER (R_MSP430X_ABS16, 15)		/* Like R_MSP430_ABS16 but with overflow checking.  */
+     RELOC_NUMBER (R_MSP430_ABS_HI16, 16)
+     RELOC_NUMBER (R_MSP430_PREL31, 17)
+     RELOC_NUMBER (R_MSP430_EHTYPE, 18)		/* Mentioned in ABI.  */
+     RELOC_NUMBER (R_MSP430X_10_PCREL, 19)	/* Red Hat invention.  Used for Jump instructions.  */
+     RELOC_NUMBER (R_MSP430X_2X_PCREL, 20)	/* Red Hat invention.  Used for relaxing jumps.  */
+     RELOC_NUMBER (R_MSP430X_SYM_DIFF, 21)	/* Red Hat invention.  Used for relaxing debug info.  */
+END_RELOC_NUMBERS (R_MSP430x_max)
+
 #endif /* _ELF_MSP430_H */
diff -urpN include/elf.mm/nds32.h include/elf/nds32.h
--- include/elf.mm/nds32.h	1970-01-01 01:00:00.000000000 +0100
+++ include/elf/nds32.h	2014-11-24 18:14:54.000000000 +0100
@@ -0,0 +1,299 @@
+/* NDS32 ELF support for BFD.
+   Copyright (C) 2012-2014 Free Software Foundation, Inc.
+   Contributed by Andes Technology Corporation.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+   02110-1301, USA.  */
+
+#ifndef _ELF_NDS32_H
+#define _ELF_NDS32_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocations.  */
+START_RELOC_NUMBERS (elf_nds32_reloc_type)
+  RELOC_NUMBER (R_NDS32_NONE, 0)
+  /* REL relocations.  */
+  RELOC_NUMBER (R_NDS32_16, 1)
+  RELOC_NUMBER (R_NDS32_32, 2)
+  RELOC_NUMBER (R_NDS32_20, 3)
+  RELOC_NUMBER (R_NDS32_9_PCREL, 4)
+  RELOC_NUMBER (R_NDS32_15_PCREL, 5)
+  RELOC_NUMBER (R_NDS32_17_PCREL, 6)
+  RELOC_NUMBER (R_NDS32_25_PCREL, 7)
+  RELOC_NUMBER (R_NDS32_HI20, 8)
+  RELOC_NUMBER (R_NDS32_LO12S3, 9)
+  RELOC_NUMBER (R_NDS32_LO12S2, 10)
+  RELOC_NUMBER (R_NDS32_LO12S1, 11)
+  RELOC_NUMBER (R_NDS32_LO12S0, 12)
+  RELOC_NUMBER (R_NDS32_SDA15S3, 13)
+  RELOC_NUMBER (R_NDS32_SDA15S2, 14)
+  RELOC_NUMBER (R_NDS32_SDA15S1, 15)
+  RELOC_NUMBER (R_NDS32_SDA15S0, 16)
+  RELOC_NUMBER (R_NDS32_GNU_VTINHERIT, 17)
+  RELOC_NUMBER (R_NDS32_GNU_VTENTRY, 18)
+
+  /* RELA relocations.  */
+  RELOC_NUMBER (R_NDS32_16_RELA, 19)
+  RELOC_NUMBER (R_NDS32_32_RELA, 20)
+  RELOC_NUMBER (R_NDS32_20_RELA, 21)
+  RELOC_NUMBER (R_NDS32_9_PCREL_RELA, 22)
+  RELOC_NUMBER (R_NDS32_15_PCREL_RELA, 23)
+  RELOC_NUMBER (R_NDS32_17_PCREL_RELA, 24)
+  RELOC_NUMBER (R_NDS32_25_PCREL_RELA, 25)
+  RELOC_NUMBER (R_NDS32_HI20_RELA, 26)
+  RELOC_NUMBER (R_NDS32_LO12S3_RELA, 27)
+  RELOC_NUMBER (R_NDS32_LO12S2_RELA, 28)
+  RELOC_NUMBER (R_NDS32_LO12S1_RELA, 29)
+  RELOC_NUMBER (R_NDS32_LO12S0_RELA, 30)
+  RELOC_NUMBER (R_NDS32_SDA15S3_RELA, 31)
+  RELOC_NUMBER (R_NDS32_SDA15S2_RELA, 32)
+  RELOC_NUMBER (R_NDS32_SDA15S1_RELA, 33)
+  RELOC_NUMBER (R_NDS32_SDA15S0_RELA, 34)
+  RELOC_NUMBER (R_NDS32_RELA_GNU_VTINHERIT, 35)
+  RELOC_NUMBER (R_NDS32_RELA_GNU_VTENTRY, 36)
+
+  RELOC_NUMBER (R_NDS32_GOT20, 37)
+  RELOC_NUMBER (R_NDS32_25_PLTREL, 38)
+  RELOC_NUMBER (R_NDS32_COPY, 39)
+  RELOC_NUMBER (R_NDS32_GLOB_DAT, 40)
+  RELOC_NUMBER (R_NDS32_JMP_SLOT, 41)
+  RELOC_NUMBER (R_NDS32_RELATIVE, 42)
+  RELOC_NUMBER (R_NDS32_GOTOFF, 43)
+  RELOC_NUMBER (R_NDS32_GOTPC20, 44)
+  RELOC_NUMBER (R_NDS32_GOT_HI20, 45)
+  RELOC_NUMBER (R_NDS32_GOT_LO12, 46)
+  RELOC_NUMBER (R_NDS32_GOTPC_HI20, 47)
+  RELOC_NUMBER (R_NDS32_GOTPC_LO12, 48)
+  RELOC_NUMBER (R_NDS32_GOTOFF_HI20, 49)
+  RELOC_NUMBER (R_NDS32_GOTOFF_LO12, 50)
+  RELOC_NUMBER (R_NDS32_INSN16, 51)
+  RELOC_NUMBER (R_NDS32_LABEL, 52)
+  RELOC_NUMBER (R_NDS32_LONGCALL1, 53)
+  RELOC_NUMBER (R_NDS32_LONGCALL2, 54)
+  RELOC_NUMBER (R_NDS32_LONGCALL3, 55)
+  RELOC_NUMBER (R_NDS32_LONGJUMP1, 56)
+  RELOC_NUMBER (R_NDS32_LONGJUMP2, 57)
+  RELOC_NUMBER (R_NDS32_LONGJUMP3, 58)
+  RELOC_NUMBER (R_NDS32_LOADSTORE, 59)
+  RELOC_NUMBER (R_NDS32_9_FIXED_RELA, 60)
+  RELOC_NUMBER (R_NDS32_15_FIXED_RELA, 61)
+  RELOC_NUMBER (R_NDS32_17_FIXED_RELA, 62)
+  RELOC_NUMBER (R_NDS32_25_FIXED_RELA, 63)
+  RELOC_NUMBER (R_NDS32_PLTREL_HI20, 64)	/* This is obsoleted.  */
+  RELOC_NUMBER (R_NDS32_PLTREL_LO12, 65)	/* This is obsoleted.  */
+  RELOC_NUMBER (R_NDS32_PLT_GOTREL_HI20, 66)
+  RELOC_NUMBER (R_NDS32_PLT_GOTREL_LO12, 67)
+  RELOC_NUMBER (R_NDS32_SDA12S2_DP_RELA, 68)
+  RELOC_NUMBER (R_NDS32_SDA12S2_SP_RELA, 69)
+  RELOC_NUMBER (R_NDS32_LO12S2_DP_RELA, 70)
+  RELOC_NUMBER (R_NDS32_LO12S2_SP_RELA, 71)
+  RELOC_NUMBER (R_NDS32_LO12S0_ORI_RELA, 72)
+  RELOC_NUMBER (R_NDS32_SDA16S3_RELA, 73)
+  RELOC_NUMBER (R_NDS32_SDA17S2_RELA, 74)
+  RELOC_NUMBER (R_NDS32_SDA18S1_RELA, 75)
+  RELOC_NUMBER (R_NDS32_SDA19S0_RELA, 76)
+  RELOC_NUMBER (R_NDS32_DWARF2_OP1_RELA, 77)
+  RELOC_NUMBER (R_NDS32_DWARF2_OP2_RELA, 78)
+  RELOC_NUMBER (R_NDS32_DWARF2_LEB_RELA, 79)
+  RELOC_NUMBER (R_NDS32_UPDATE_TA_RELA, 80)	/* This is obsoleted.  */
+  RELOC_NUMBER (R_NDS32_9_PLTREL, 81)
+  RELOC_NUMBER (R_NDS32_PLT_GOTREL_LO20, 82)
+  RELOC_NUMBER (R_NDS32_PLT_GOTREL_LO15, 83)
+  RELOC_NUMBER (R_NDS32_PLT_GOTREL_LO19, 84)
+  RELOC_NUMBER (R_NDS32_GOT_LO15, 85)
+  RELOC_NUMBER (R_NDS32_GOT_LO19, 86)
+  RELOC_NUMBER (R_NDS32_GOTOFF_LO15, 87)
+  RELOC_NUMBER (R_NDS32_GOTOFF_LO19, 88)
+  RELOC_NUMBER (R_NDS32_GOT15S2_RELA, 89)
+  RELOC_NUMBER (R_NDS32_GOT17S2_RELA, 90)
+  RELOC_NUMBER (R_NDS32_5_RELA, 91)
+  RELOC_NUMBER (R_NDS32_10_UPCREL_RELA, 92)	/* This is obsoleted.  */
+  RELOC_NUMBER (R_NDS32_SDA_FP7U2_RELA, 93)
+  RELOC_NUMBER (R_NDS32_WORD_9_PCREL_RELA, 94)
+  RELOC_NUMBER (R_NDS32_25_ABS_RELA, 95)
+  RELOC_NUMBER (R_NDS32_17IFC_PCREL_RELA, 96)
+  RELOC_NUMBER (R_NDS32_10IFCU_PCREL_RELA, 97)
+  RELOC_NUMBER (R_NDS32_TLS_LE_HI20, 98)
+  RELOC_NUMBER (R_NDS32_TLS_LE_LO12, 99)
+  RELOC_NUMBER (R_NDS32_TLS_IE_HI20, 100)
+  RELOC_NUMBER (R_NDS32_TLS_IE_LO12S2, 101)
+  RELOC_NUMBER (R_NDS32_TLS_TPOFF, 102)
+  RELOC_NUMBER (R_NDS32_TLS_LE_20, 103)
+  RELOC_NUMBER (R_NDS32_TLS_LE_15S0, 104)
+  RELOC_NUMBER (R_NDS32_TLS_LE_15S1, 105)
+  RELOC_NUMBER (R_NDS32_TLS_LE_15S2, 106)
+  RELOC_NUMBER (R_NDS32_LONGCALL4, 107)
+  RELOC_NUMBER (R_NDS32_LONGCALL5, 108)
+  RELOC_NUMBER (R_NDS32_LONGCALL6, 109)
+  RELOC_NUMBER (R_NDS32_LONGJUMP4, 110)
+  RELOC_NUMBER (R_NDS32_LONGJUMP5, 111)
+  RELOC_NUMBER (R_NDS32_LONGJUMP6, 112)
+  RELOC_NUMBER (R_NDS32_LONGJUMP7, 113)
+
+  RELOC_NUMBER (R_NDS32_RELAX_ENTRY, 192)
+  RELOC_NUMBER (R_NDS32_GOT_SUFF, 193)
+  RELOC_NUMBER (R_NDS32_GOTOFF_SUFF, 194)
+  RELOC_NUMBER (R_NDS32_PLT_GOT_SUFF, 195)
+  RELOC_NUMBER (R_NDS32_MULCALL_SUFF, 196)	/* This is obsoleted.  */
+  RELOC_NUMBER (R_NDS32_PTR, 197)
+  RELOC_NUMBER (R_NDS32_PTR_COUNT, 198)
+  RELOC_NUMBER (R_NDS32_PTR_RESOLVED, 199)
+  RELOC_NUMBER (R_NDS32_PLTBLOCK, 200)		/* This is obsoleted.  */
+  RELOC_NUMBER (R_NDS32_RELAX_REGION_BEGIN, 201)
+  RELOC_NUMBER (R_NDS32_RELAX_REGION_END, 202)
+  RELOC_NUMBER (R_NDS32_MINUEND, 203)
+  RELOC_NUMBER (R_NDS32_SUBTRAHEND, 204)
+  RELOC_NUMBER (R_NDS32_DIFF8, 205)
+  RELOC_NUMBER (R_NDS32_DIFF16, 206)
+  RELOC_NUMBER (R_NDS32_DIFF32, 207)
+  RELOC_NUMBER (R_NDS32_DIFF_ULEB128, 208)
+  RELOC_NUMBER (R_NDS32_DATA, 209)
+  RELOC_NUMBER (R_NDS32_TRAN, 210)
+  RELOC_NUMBER (R_NDS32_TLS_LE_ADD, 211)
+  RELOC_NUMBER (R_NDS32_TLS_LE_LS, 212)
+  RELOC_NUMBER (R_NDS32_EMPTY, 213)
+
+END_RELOC_NUMBERS (R_NDS32_max)
+
+/* Processor specific section indices.  These sections do not actually
+   exist.  Symbols with a st_shndx field corresponding to one of these
+   values have a special meaning.  */
+
+/* Processor specific flags for the ELF header e_flags field.
+
+   31   28 27		      8 7   4 3       0
+   ---------------------------------------------
+   | ARCH | CONFUGURAION FIELD | ABI | ELF_VER |
+   ---------------------------------------------  */
+
+/* Architechure definition.  */
+
+/* 4-bit (b31-b28) nds32 architecture field.
+   We can have up to 15 architectures; 0000 is for unknown.  */
+#define EF_NDS_ARCH				0xF0000000
+#define EF_NDS_ARCH_SHIFT			28
+/* There could be more architectures. For now, only n1 and n1h.  */
+#define E_NDS_ARCH_STAR_RESERVED		0x00000000
+#define E_NDS_ARCH_STAR_V1_0			0x10000000
+#define E_NDS_ARCH_STAR_V2_0			0x20000000
+#define E_NDS_ARCH_STAR_V3_0			0x30000000
+#define E_NDS_ARCH_STAR_V3_M			0x40000000
+#define E_NDS_ARCH_STAR_V0_9			0x90000000	/* Obsoleted.  */
+/* n1 code.  */
+#define E_N1_ARCH			E_NDS_ARCH_STAR_V0_9
+/* n1h code.  */
+#define E_N1H_ARCH			E_NDS_ARCH_STAR_V1_0
+
+
+/* Configuration field definitioans.  */
+#define EF_NDS_INST				0x0FFFFF00
+
+/* E_NDS_ARCH_STAR_V1_0 configuration fields.
+
+   E_NDS_ARCH_STAR_V2_0 configuration fields.
+   These are discarded in v2.
+     * E_NDS32_HAS_MFUSR_PC_INST	0x00000100
+     * E_NDS32_HAS_DIV_INST		0x00002000
+     * E_NDS32_HAS_NO_MAC_INST		0x00100000
+   These are added in v2.
+     * E_NDS32_HAS_DIV_DX_INST		0x00002000
+     * E_NDS32_HAS_MAC_DX_INST		0x00100000  */
+
+/* MFUSR rt, PC and correct ISYNC, MSYNC instructions.
+   Old N1213HC has no such instructions.  */
+#define E_NDS32_HAS_MFUSR_PC_INST		0x00000100 /* Reclaimed.  */
+#define E_NDS32_HAS_EX9_INST			0x00000100 /* v3, ELF 1.4.  */
+/* C/C++ performance extension instructions.  */
+#define E_NDS32_HAS_EXT_INST			0x00000200
+/* Performance extension set II instructions.  */
+#define E_NDS32_HAS_EXT2_INST			0x00000400
+/* Single precision Floating point processor instructions.  */
+#define E_NDS32_HAS_FPU_INST			0x00000800
+/* Audio instructions with 32-bit audio dx.lo register.  */
+#define E_NDS32_HAS_AUDIO_INST			0x00001000
+/* DIV instructions.  */
+#define E_NDS32_HAS_DIV_INST			0x00002000 /* Reclaimed.  */
+/* DIV instructions using d0/d1.  */
+#define E_NDS32_HAS_DIV_DX_INST			0x00002000 /* v2.  */
+/* 16-bit instructions.  */
+#define E_NDS32_HAS_16BIT_INST			0x00004000 /* Reclaimed.  */
+#define E_NDS32_HAS_IFC_INST			0x00004000 /* v3, ELF 1.4.  */
+/* String operation instructions.  */
+#define E_NDS32_HAS_STRING_INST			0x00008000
+/* Reduced register file.  */
+#define E_NDS32_HAS_REDUCED_REGS		0x00010000
+/* Video instructions.  */
+#define E_NDS32_HAS_VIDEO_INST			0x00020000 /* Reclaimed.  */
+#define E_NDS32_HAS_SATURATION_INST		0x00020000 /* v3, ELF 1.4.  */
+/* Encription instructions.  */
+#define E_NDS32_HAS_ENCRIPT_INST		0x00040000
+/* Doulbe Precision Floating point processor instructions.  */
+#define E_NDS32_HAS_FPU_DP_INST			0x00080000
+/* No MAC instruction used.  */
+#define E_NDS32_HAS_NO_MAC_INST			0x00100000 /* Reclaimed when V2/V3.  */
+/* MAC instruction using d0/d1.  */
+#define E_NDS32_HAS_MAC_DX_INST			0x00100000 /* v2.  */
+/* L2 cache instruction.  */
+#define E_NDS32_HAS_L2C_INST			0x00200000
+/* FPU registers configuration when FPU SP/DP presents; 0x00c00000.  */
+#define E_NDS32_FPU_REG_CONF_SHIFT		22
+#define E_NDS32_FPU_REG_CONF			(0x3 << E_NDS32_FPU_REG_CONF_SHIFT)
+#define E_NDS32_FPU_REG_8SP_4DP			0x0
+#define E_NDS32_FPU_REG_16SP_8DP		0x1
+#define E_NDS32_FPU_REG_32SP_16DP		0x2
+#define E_NDS32_FPU_REG_32SP_32DP		0x3
+/* FPU MAC instruction used.  */
+#define E_NDS32_HAS_FPU_MAC_INST		0x01000000
+/* <<<Empty Check>>>.  */
+#define E_NDS32_NULL				0x02000000
+/* PIC enabled.  */
+#define E_NDS32_HAS_PIC				0x04000000
+/* Use custom section.  */
+#define E_NDS32_HAS_CUSTOM_SEC			0x08000000
+
+/* 4-bit for ABI signature, allow up to 16 ABIs
+   0: for OLD ABI V0, phase out
+   1: for V1 , starting with V0 toolchain
+   2: for V2
+   3: for V2FP (fs0, fs1 as function parameter)
+   4: for AABI  */
+/* Only old N1213HC use V0.
+   New ABI is used due to return register is changed to r0 from r5.  */
+#define EF_NDS_ABI				0x000000F0
+#define EF_NDS_ABI_SHIFT			4
+#define E_NDS_ABI_V0				0x00000000
+#define E_NDS_ABI_V1				0x00000010
+#define E_NDS_ABI_V2				0x00000020
+#define E_NDS_ABI_V2FP				0x00000030
+#define E_NDS_ABI_AABI				0x00000040
+#define E_NDS_ABI_V2FP_PLUS			0x00000050
+
+/* This flag signifies the version of Andes ELF.
+   Some more information may exist somewhere which is TBD.  */
+#define EF_NDS32_ELF_VERSION			0x0000000F
+#define EF_NDS32_ELF_VERSION_SHIFT		0
+
+/* Andes ELF Version 1.3 and before.  */
+#define E_NDS32_ELF_VER_1_2			0x0
+/* Andes ELF Version 1.31.  */
+#define E_NDS32_ELF_VER_1_3			0x1
+/* Andes ELF Version 1.4. Change the way we fix .debug_* and .gcc_except_table.
+   Change three bit for EX9, IFC and SAT.  */
+#define E_NDS32_ELF_VER_1_4			0x2
+
+#endif
diff -urpN include/elf.mm/nios2.h include/elf/nios2.h
--- include/elf.mm/nios2.h	1970-01-01 01:00:00.000000000 +0100
+++ include/elf/nios2.h	2014-11-24 18:14:54.000000000 +0100
@@ -0,0 +1,96 @@
+/* Altera Nios II ELF support for BFD.
+   Copyright (C) 2012-2014 Free Software Foundation, Inc.
+   Contributed by Nigel Gray (ngray@altera.com).
+   Contributed by Mentor Graphics, Inc.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+
+/* This file holds definitions specific to the Altera Nios II ELF ABI.  Note
+   that most of this is not actually implemented by BFD.  */
+
+#ifndef _ELF_NIOS2_H
+#define _ELF_NIOS2_H
+
+#include "elf/reloc-macros.h"
+
+/* The order of these numbers must match the order in
+   the elf_nios2_howto_table_rel table for the lookup
+   function to work properly.  */
+
+START_RELOC_NUMBERS (elf_nios2_reloc_type)
+  RELOC_NUMBER (R_NIOS2_NONE,	  0)
+  RELOC_NUMBER (R_NIOS2_S16,	  1)
+  RELOC_NUMBER (R_NIOS2_U16,	  2)
+  RELOC_NUMBER (R_NIOS2_PCREL16, 3)
+  RELOC_NUMBER (R_NIOS2_CALL26,  4)
+  RELOC_NUMBER (R_NIOS2_IMM5,	  5)
+  RELOC_NUMBER (R_NIOS2_CACHE_OPX, 6)
+  RELOC_NUMBER (R_NIOS2_IMM6,	  7)
+  RELOC_NUMBER (R_NIOS2_IMM8,	  8)
+  RELOC_NUMBER (R_NIOS2_HI16,	  9)
+  RELOC_NUMBER (R_NIOS2_LO16,	  10)
+  RELOC_NUMBER (R_NIOS2_HIADJ16, 11)
+  RELOC_NUMBER (R_NIOS2_BFD_RELOC_32, 12)
+  RELOC_NUMBER (R_NIOS2_BFD_RELOC_16, 13)
+  RELOC_NUMBER (R_NIOS2_BFD_RELOC_8, 14)
+  RELOC_NUMBER (R_NIOS2_GPREL, 15)
+  RELOC_NUMBER (R_NIOS2_GNU_VTINHERIT, 16)
+  RELOC_NUMBER (R_NIOS2_GNU_VTENTRY, 17)
+  RELOC_NUMBER (R_NIOS2_UJMP, 18)
+  RELOC_NUMBER (R_NIOS2_CJMP, 19)
+  RELOC_NUMBER (R_NIOS2_CALLR, 20)
+  RELOC_NUMBER (R_NIOS2_ALIGN, 21)
+  RELOC_NUMBER (R_NIOS2_GOT16, 22)
+  RELOC_NUMBER (R_NIOS2_CALL16, 23)
+  RELOC_NUMBER (R_NIOS2_GOTOFF_LO, 24)
+  RELOC_NUMBER (R_NIOS2_GOTOFF_HA, 25)
+  RELOC_NUMBER (R_NIOS2_PCREL_LO, 26)
+  RELOC_NUMBER (R_NIOS2_PCREL_HA, 27)
+  RELOC_NUMBER (R_NIOS2_TLS_GD16, 28)
+  RELOC_NUMBER (R_NIOS2_TLS_LDM16, 29)
+  RELOC_NUMBER (R_NIOS2_TLS_LDO16, 30)
+  RELOC_NUMBER (R_NIOS2_TLS_IE16, 31)
+  RELOC_NUMBER (R_NIOS2_TLS_LE16, 32)
+  RELOC_NUMBER (R_NIOS2_TLS_DTPMOD, 33)
+  RELOC_NUMBER (R_NIOS2_TLS_DTPREL, 34)
+  RELOC_NUMBER (R_NIOS2_TLS_TPREL, 35)
+  RELOC_NUMBER (R_NIOS2_COPY, 36)
+  RELOC_NUMBER (R_NIOS2_GLOB_DAT, 37)
+  RELOC_NUMBER (R_NIOS2_JUMP_SLOT, 38)
+  RELOC_NUMBER (R_NIOS2_RELATIVE, 39)
+  RELOC_NUMBER (R_NIOS2_GOTOFF, 40)
+  RELOC_NUMBER (R_NIOS2_CALL26_NOAT,  41)
+  RELOC_NUMBER (R_NIOS2_GOT_LO, 42)
+  RELOC_NUMBER (R_NIOS2_GOT_HA, 43)
+  RELOC_NUMBER (R_NIOS2_CALL_LO, 44)
+  RELOC_NUMBER (R_NIOS2_CALL_HA, 45)
+  RELOC_NUMBER (R_NIOS2_ILLEGAL, 46)
+END_RELOC_NUMBERS (R_NIOS2_maxext)
+
+/* Processor-specific section flags.  */
+
+/* This is used to mark gp-relative sections.  */
+#define SHF_NIOS2_GPREL	0x10000000
+
+/* Processor-specific dynamic array tags.  */
+
+/* Address of _gp.  */
+#define DT_NIOS2_GP 0x70000002
+
+#endif /* _ELF_NIOS2_H */
diff -urpN include/elf.mm/or1k.h include/elf/or1k.h
--- include/elf.mm/or1k.h	1970-01-01 01:00:00.000000000 +0100
+++ include/elf/or1k.h	2014-11-24 18:14:54.000000000 +0100
@@ -0,0 +1,65 @@
+/* Or1k ELF support for BFD.
+   Copyright 2001-2014 Free Software Foundation, Inc.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, see <http://www.gnu.org/licenses/> */
+
+#ifndef _ELF_OR1K_H
+#define _ELF_OR1K_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocations.  */
+START_RELOC_NUMBERS (elf_or1k_reloc_type)
+  RELOC_NUMBER (R_OR1K_NONE,           0)
+  RELOC_NUMBER (R_OR1K_32,             1)
+  RELOC_NUMBER (R_OR1K_16,             2)
+  RELOC_NUMBER (R_OR1K_8,              3)
+  RELOC_NUMBER (R_OR1K_LO_16_IN_INSN,  4)
+  RELOC_NUMBER (R_OR1K_HI_16_IN_INSN,  5)
+  RELOC_NUMBER (R_OR1K_INSN_REL_26,    6)
+  RELOC_NUMBER (R_OR1K_GNU_VTENTRY,    7)
+  RELOC_NUMBER (R_OR1K_GNU_VTINHERIT,  8)
+  RELOC_NUMBER (R_OR1K_32_PCREL,       9)
+  RELOC_NUMBER (R_OR1K_16_PCREL,      10)
+  RELOC_NUMBER (R_OR1K_8_PCREL,       11)
+  RELOC_NUMBER (R_OR1K_GOTPC_HI16,    12)
+  RELOC_NUMBER (R_OR1K_GOTPC_LO16,    13)
+  RELOC_NUMBER (R_OR1K_GOT16,         14)
+  RELOC_NUMBER (R_OR1K_PLT26,         15)
+  RELOC_NUMBER (R_OR1K_GOTOFF_HI16,   16)
+  RELOC_NUMBER (R_OR1K_GOTOFF_LO16,   17)
+  RELOC_NUMBER (R_OR1K_COPY,          18)
+  RELOC_NUMBER (R_OR1K_GLOB_DAT,      19)
+  RELOC_NUMBER (R_OR1K_JMP_SLOT,      20)
+  RELOC_NUMBER (R_OR1K_RELATIVE,      21)
+  RELOC_NUMBER (R_OR1K_TLS_GD_HI16,   22)
+  RELOC_NUMBER (R_OR1K_TLS_GD_LO16,   23)
+  RELOC_NUMBER (R_OR1K_TLS_LDM_HI16,  24)
+  RELOC_NUMBER (R_OR1K_TLS_LDM_LO16,  25)
+  RELOC_NUMBER (R_OR1K_TLS_LDO_HI16,  26)
+  RELOC_NUMBER (R_OR1K_TLS_LDO_LO16,  27)
+  RELOC_NUMBER (R_OR1K_TLS_IE_HI16,   28)
+  RELOC_NUMBER (R_OR1K_TLS_IE_LO16,   29)
+  RELOC_NUMBER (R_OR1K_TLS_LE_HI16,   30)
+  RELOC_NUMBER (R_OR1K_TLS_LE_LO16,   31)
+  RELOC_NUMBER (R_OR1K_TLS_TPOFF,     32)
+  RELOC_NUMBER (R_OR1K_TLS_DTPOFF,    33)
+  RELOC_NUMBER (R_OR1K_TLS_DTPMOD,    34)
+END_RELOC_NUMBERS (R_OR1K_max)
+
+#define EF_OR1K_NODELAY (1UL << 0)
+
+#endif /* _ELF_OR1K_H */
diff -urpN include/elf.mm/ppc64.h include/elf/ppc64.h
--- include/elf.mm/ppc64.h	2011-10-10 15:21:05.000000000 +0200
+++ include/elf/ppc64.h	2014-11-24 18:14:54.000000000 +0100
@@ -141,6 +141,18 @@ START_RELOC_NUMBERS (elf_ppc64_reloc_typ
   RELOC_NUMBER (R_PPC64_TLSLD,		   108)
   RELOC_NUMBER (R_PPC64_TOCSAVE,	   109)
 
+/* Added when HA and HI relocs were changed to report overflows.  */
+  RELOC_NUMBER (R_PPC64_ADDR16_HIGH,	   110)
+  RELOC_NUMBER (R_PPC64_ADDR16_HIGHA,	   111)
+  RELOC_NUMBER (R_PPC64_TPREL16_HIGH,	   112)
+  RELOC_NUMBER (R_PPC64_TPREL16_HIGHA,	   113)
+  RELOC_NUMBER (R_PPC64_DTPREL16_HIGH,	   114)
+  RELOC_NUMBER (R_PPC64_DTPREL16_HIGHA,	   115)
+
+/* Added for ELFv2.  */
+  RELOC_NUMBER (R_PPC64_REL24_NOTOC,	   116)
+  RELOC_NUMBER (R_PPC64_ADDR64_LOCAL,	   117)
+
 #ifndef RELOC_MACROS_GEN_FUNC
 /* Fake relocation only used internally by ld.  */
   RELOC_NUMBER (R_PPC64_LO_DS_OPT,	   128)
@@ -161,8 +173,63 @@ START_RELOC_NUMBERS (elf_ppc64_reloc_typ
 
 END_RELOC_NUMBERS (R_PPC64_max)
 
-#define IS_PPC64_TLS_RELOC(R) \
-  ((R) >= R_PPC64_TLS && (R) <= R_PPC64_DTPREL16_HIGHESTA)
+#define IS_PPC64_TLS_RELOC(R)						\
+  (((R) >= R_PPC64_TLS && (R) <= R_PPC64_DTPREL16_HIGHESTA)		\
+   || ((R) >= R_PPC64_TPREL16_HIGH && (R) <= R_PPC64_DTPREL16_HIGHA))
+
+
+/* e_flags bits specifying ABI.
+   1 for original function descriptor using ABI,
+   2 for revised ABI without function descriptors,
+   0 for unspecified or not using any features affected by the differences.  */
+#define EF_PPC64_ABI	3
+
+/* The ELFv2 ABI uses three bits in the symbol st_other field of a
+   function definition to specify the number of instructions between a
+   function's global entry point and local entry point.
+   The global entry point is used when it is necessary to set up the
+   toc pointer (r2) for the function.  Callers must enter the global
+   entry point with r12 set to the global entry point address.  On
+   return from the function, r2 may have a different value to that
+   which it had on entry.
+   The local entry point is used when r2 is known to already be valid
+   for the function.  There is no requirement on r12 when using the
+   local entry point, and on return r2 will contain the same value as
+   at entry.
+   A value of zero in these bits means that the function has a single
+   entry point with no requirement on r12 or r2, and that on return r2
+   will contain the same value as at entry.
+   Values of one and seven are reserved.  */
+#define STO_PPC64_LOCAL_BIT		5
+#define STO_PPC64_LOCAL_MASK		(7 << STO_PPC64_LOCAL_BIT)
+
+// 3 bit other field to bytes.
+static inline unsigned int
+ppc64_decode_local_entry(unsigned int other)
+{
+  return ((1 << other) >> 2) << 2;
+}
+
+// bytes to field value.
+static inline unsigned int
+ppc64_encode_local_entry(unsigned int val)
+{
+  return (val >= 4 * 4
+	  ? (val >= 8 * 4
+	     ? (val >= 16 * 4 ? 6 : 5)
+	     : 4)
+	  : (val >= 2 * 4
+	     ? 3
+	     : (val >= 1 * 4 ? 2 : 0)));
+}
+
+/* st_other to number of bytes.  */
+#define PPC64_LOCAL_ENTRY_OFFSET(other)				\
+  ppc64_decode_local_entry (((other) & STO_PPC64_LOCAL_MASK)	\
+			    >> STO_PPC64_LOCAL_BIT)
+/* number of bytes to st_other.  */
+#define PPC64_SET_LOCAL_ENTRY_OFFSET(val)		\
+  ppc64_encode_local_entry (val) << STO_PPC64_LOCAL_BIT
 
 /* Specify the start of the .glink section.  */
 #define DT_PPC64_GLINK		DT_LOPROC
diff -urpN include/elf.mm/rl78.h include/elf/rl78.h
--- include/elf.mm/rl78.h	2011-12-23 02:49:37.000000000 +0100
+++ include/elf/rl78.h	2014-11-24 18:14:54.000000000 +0100
@@ -104,10 +104,12 @@ END_RELOC_NUMBERS (R_RL78_max)
 #define EF_RL78_ALL_FLAGS	(EF_RL78_CPU_MASK)
 
 /* Values for the e_flags field in the ELF header.  */
-#define E_FLAG_RL78_64BIT_DOUBLES		(1 << 0)
+#define E_FLAG_RL78_64BIT_DOUBLES	(1 << 0)
 #define E_FLAG_RL78_DSP			(1 << 1) /* Defined in the RL78 CPU Object file specification, but not explained.  */
+#define E_FLAG_RL78_G10			(1 << 2) /* CPU is missing register banks 1-3, so uses different ABI.  */
 
 /* These define the addend field of R_RL78_RH_RELAX relocations.  */
+#define RL78_RELAXA_MASK	0x000000f0	/* Mask for relax types */
 #define	RL78_RELAXA_BRA		0x00000010	/* Any type of branch (must be decoded).  */
 #define	RL78_RELAXA_ADDR16	0x00000020	/* addr16->sfr/saddr opportunity  */
 #define RL78_RELAXA_RNUM	0x0000000f	/* Number of associated relocations.  */
diff -urpN include/elf.mm/rx.h include/elf/rx.h
--- include/elf.mm/rx.h	2011-10-05 16:13:29.000000000 +0200
+++ include/elf/rx.h	2014-11-24 18:14:54.000000000 +0100
@@ -110,7 +110,7 @@ START_RELOC_NUMBERS (elf_rx_reloc_type)
 
 END_RELOC_NUMBERS (R_RX_max)
 
-#define EF_RX_CPU_RX	0x00000079      /* FIXME: correct value?  */
+#define EF_RX_CPU_RX	0x00000079      /* FIXME: this collides with the E_FLAG_RX_... values below.  */
 #define EF_RX_CPU_MASK	0x0000007F	/* specific cpu bits.  */
 #define EF_RX_ALL_FLAGS	(EF_RX_CPU_MASK)
 
@@ -118,6 +118,7 @@ END_RELOC_NUMBERS (R_RX_max)
 #define E_FLAG_RX_64BIT_DOUBLES		(1 << 0)
 #define E_FLAG_RX_DSP			(1 << 1) /* Defined in the RX CPU Object file specification, but not explained. */
 #define E_FLAG_RX_PID			(1 << 2) /* Unofficial - DJ */
+#define E_FLAG_RX_ABI			(1 << 3) /* Binary passes stacked arguments using natural alignment.  Unofficial - NC.  */
 
 /* These define the addend field of R_RX_RH_RELAX relocations.  */
 #define	RX_RELAXA_IMM6	0x00000010	/* Imm8/16/24/32 at bit offset 6.  */
diff -urpN include/elf.mm/s390.h include/elf/s390.h
--- include/elf.mm/s390.h	2012-07-13 17:47:25.000000000 +0200
+++ include/elf/s390.h	2014-11-24 18:14:54.000000000 +0100
@@ -57,8 +57,12 @@ START_RELOC_NUMBERS (elf_s390_reloc_type
     RELOC_NUMBER (R_390_GOTPC, 14)	/* 32 bit PC relative offset to GOT.  */
     RELOC_NUMBER (R_390_GOT16, 15)	/* 16 bit GOT offset.  */
     RELOC_NUMBER (R_390_PC16, 16)	/* PC relative 16 bit.  */
+    RELOC_NUMBER (R_390_PC12DBL, 62)	/* PC relative 12 bit shifted by 1.  */
+    RELOC_NUMBER (R_390_PLT12DBL, 63)	/* 12 bit PC rel. PLT shifted by 1.  */
     RELOC_NUMBER (R_390_PC16DBL, 17)	/* PC relative 16 bit shifted by 1.  */
     RELOC_NUMBER (R_390_PLT16DBL, 18)	/* 16 bit PC rel. PLT shifted by 1.  */
+    RELOC_NUMBER (R_390_PC24DBL, 64)	/* PC relative 24 bit shifted by 1.  */
+    RELOC_NUMBER (R_390_PLT24DBL, 65)	/* 24 bit PC rel. PLT shifted by 1.  */
     RELOC_NUMBER (R_390_PC32DBL, 19)	/* PC relative 32 bit shifted by 1.  */
     RELOC_NUMBER (R_390_PLT32DBL, 20)	/* 32 bit PC rel. PLT shifted by 1.  */
     RELOC_NUMBER (R_390_GOTPCDBL, 21)	/* 32 bit PC rel. GOT shifted by 1.  */
diff -urpN include/elf.mm/sparc.h include/elf/sparc.h
--- include/elf.mm/sparc.h	2012-04-27 20:00:52.000000000 +0200
+++ include/elf/sparc.h	2014-11-24 18:14:54.000000000 +0100
@@ -192,9 +190,19 @@ enum
 {
   /* 0-3 are generic.  */
   Tag_GNU_Sparc_HWCAPS = 4,
+  Tag_GNU_Sparc_HWCAPS2 = 8
 };
 
-/* These values match the AV_SPARC_* hwcap bits defined under Solaris.  */
+/* Generally speaking the ELF_SPARC_HWCAP_* and ELF_SPARC_HWCAP2_*
+   values match the AV_SPARC_* and AV2_SPARC_* bits respectively.
+
+   However Solaris 11 introduced a backwards-incompatible change
+   deprecating the RANDOM, TRANS and ASI_CACHE_SPARING bits in the
+   AT_SUNW_CAP_HW1 flags, reusing the bits for the unrelated hwcaps
+   FJATHHPC, FJDES and FJAES respectively.  In GNU/Linux we opted to
+   keep the old hwcaps in Tag_GNU_Sparc_HWCAPS and allocate bits for
+   FJATHHPC, FJDES and JFAES in Tag_GNU_Sparc_HWCAPS2.  */
+
 #define ELF_SPARC_HWCAP_MUL32	0x00000001 /* umul/umulcc/smul/smulcc insns */
 #define ELF_SPARC_HWCAP_DIV32	0x00000002 /* udiv/udivcc/sdiv/sdivcc insns */
 #define ELF_SPARC_HWCAP_FSMULD	0x00000004 /* 'fsmuld' insn */
@@ -228,4 +236,17 @@ enum
 #define ELF_SPARC_HWCAP_CBCOND	0x10000000 /* Compare and Branch insns */
 #define ELF_SPARC_HWCAP_CRC32C	0x20000000 /* CRC32C insn */
 
+#define ELF_SPARC_HWCAP2_FJATHPLUS 0x00000001 /* Fujitsu Athena+ */
+#define ELF_SPARC_HWCAP2_VIS3B     0x00000002 /* Subset of VIS3 present on sparc64 X+ */
+#define ELF_SPARC_HWCAP2_ADP       0x00000004 /* Application Data Protection */
+#define ELF_SPARC_HWCAP2_SPARC5    0x00000008 /* The 29 new fp and sub instructions */
+#define ELF_SPARC_HWCAP2_MWAIT     0x00000010 /* mwait instruction and load/monitor ASIs */
+#define ELF_SPARC_HWCAP2_XMPMUL    0x00000020 /* XOR multiple precision multiply */
+#define ELF_SPARC_HWCAP2_XMONT     0x00000040 /* XOR Montgomery mult/sqr instructions */
+#define ELF_SPARC_HWCAP2_NSEC      \
+                                   0x00000080 /* pause insn with support for nsec timings */
+#define ELF_SPARC_HWCAP2_FJATHHPC  0x00001000 /* Fujitsu HPC instrs */
+#define ELF_SPARC_HWCAP2_FJDES     0x00002000 /* Fujitsu DES instrs */
+#define ELF_SPARC_HWCAP2_FJAES     0x00010000 /* Fujitsu AES instrs */
+
 #endif /* _ELF_SPARC_H */
diff -urpN include/elf.mm/tilegx.h include/elf/tilegx.h
--- include/elf.mm/tilegx.h	2012-02-25 23:24:21.000000000 +0100
+++ include/elf/tilegx.h	2014-11-24 18:14:54.000000000 +0100
@@ -104,13 +104,21 @@ START_RELOC_NUMBERS (elf_tilegx_reloc_ty
 
   RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_GOT,          64)
   RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_GOT,          65)
-  /* Relocs 66-71 are currently not defined.  */
+
+  RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_PLT_PCREL,    66)
+  RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_PLT_PCREL,    67)
+  RELOC_NUMBER (R_TILEGX_IMM16_X0_HW1_PLT_PCREL,    68)
+  RELOC_NUMBER (R_TILEGX_IMM16_X1_HW1_PLT_PCREL,    69)
+  RELOC_NUMBER (R_TILEGX_IMM16_X0_HW2_PLT_PCREL,    70)
+  RELOC_NUMBER (R_TILEGX_IMM16_X1_HW2_PLT_PCREL,    71)
 
   RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_LAST_GOT,     72)
   RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_LAST_GOT,     73)
   RELOC_NUMBER (R_TILEGX_IMM16_X0_HW1_LAST_GOT,     74)
   RELOC_NUMBER (R_TILEGX_IMM16_X1_HW1_LAST_GOT,     75)
-  /* Relocs 76-77 are currently not defined.  */
+
+  RELOC_NUMBER (R_TILEGX_IMM16_X0_HW3_PLT_PCREL,    76)
+  RELOC_NUMBER (R_TILEGX_IMM16_X1_HW3_PLT_PCREL,    77)
 
   RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_TLS_GD,       78)
   RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_TLS_GD,       79)
@@ -128,7 +136,13 @@ START_RELOC_NUMBERS (elf_tilegx_reloc_ty
 
   RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_TLS_IE,       92)
   RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_TLS_IE,       93)
-  /* Relocs 94-99 are currently not defined.  */
+
+  RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL, 94)
+  RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL, 95)
+  RELOC_NUMBER (R_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL, 96)
+  RELOC_NUMBER (R_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL, 97)
+  RELOC_NUMBER (R_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL, 98)
+  RELOC_NUMBER (R_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL, 99)
 
   RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_LAST_TLS_IE, 100)
   RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_LAST_TLS_IE, 101)
diff -urpN include/elf.mm/v850.h include/elf/v850.h
--- include/elf.mm/v850.h	2010-07-23 16:52:52.000000000 +0200
+++ include/elf/v850.h	2014-11-24 18:14:54.000000000 +0100
@@ -46,6 +45,9 @@
 /* v850e2v3 code.  */
 #define E_V850E2V3_ARCH		0x40000000
 
+/* v850e3v5 code.  */
+#define E_V850E3V5_ARCH		0x60000000
+
 /* Flags for the st_other field.  */
 #define V850_OTHER_SDA		0x10	/* Symbol had SDA relocations.  */
 #define V850_OTHER_ZDA		0x20	/* Symbol had ZDA relocations.  */
@@ -148,4 +150,134 @@ END_RELOC_NUMBERS (R_V850_max)
 /* This section must be in the zero data area (pointed to by R0).  */
 #define SHF_V850_R0REL		0x40000000
 
+/* Alternative versions of the above definitions, as specified by the RH850 ABI.  */
+
+#define EF_RH850_ABI		0xF0000000
+
+#define EF_V800_850E3		0x00100000
+
+#define EF_RH850_FPU_DOUBLE	0x00000001	/* sizeof(double) == 8.  */
+#define EF_RH850_FPU_SINGLE	0x00000002	/* sizeof(double) == 4.  */
+#define EF_RH850_SIMD		0x00000004
+#define EF_RH850_CACHE		0x00000008
+#define EF_RH850_MMU		0x00000010
+#define EF_RH850_REGMODE22	0x00000020	/* Registers r15-r24 (inclusive) are not used.  */
+#define EF_RH850_REGMODE32	0x00000040
+#define EF_RH850_DATA_ALIGN8	0x00000080	/* 8-byte alignment supported.  */
+#define EF_RH850_GP_FIX		0x00000100	/* r4 is fixed.  */
+#define EF_RH850_GP_NOFIX	0x00000200	/* r4 is callee save.  */
+#define EF_RH850_EP_FIX		0x00000400	/* r30 is fixed.  */
+#define EF_RH850_EP_NOFIX	0x00000800	/* r30 is callee save.  */
+#define EF_RH850_TP_FIX		0x00001000	/* r5 is fixed.  */
+#define EF_RH850_TP_NOFIX	0x00002000	/* r5 is callee save.  */
+#define EF_RH850_REG2_RESERVE	0x00004000	/* r2 is fixed.  */
+#define EF_RH850_REG2_NORESERVE 0x00008000	/* r2 is callee saved.  */
+
+#define SHT_RNESAS_IOP		SHT_LOUSER	/* Used by Renesas linker.  */
+
+#define SHF_RENESAS_ABS		0x80000000	/* Absolute section.  */
+#define SHF_GHS_ABS		0x00000400	/* Use unknown.  */
+
+#define STT_RENESAS_ENTRY	14		/* Set for functions called at reset time.  */
+
+START_RELOC_NUMBERS (v800_reloc_type)
+
+     RELOC_NUMBER (R_V800_NONE,      0x00)
+     RELOC_NUMBER (R_V810_NONE,      0x30)
+     RELOC_NUMBER (R_V810_BYTE,      0x31)
+     RELOC_NUMBER (R_V810_HWORD,     0x32)
+     RELOC_NUMBER (R_V810_WORD,      0x33)
+     RELOC_NUMBER (R_V810_WLO,       0x34)
+     RELOC_NUMBER (R_V810_WHI,       0x35)
+     RELOC_NUMBER (R_V810_WHI1,      0x36)
+     RELOC_NUMBER (R_V810_GPBYTE,    0x37)
+     RELOC_NUMBER (R_V810_GPHWORD,   0x38)
+     RELOC_NUMBER (R_V810_GPWORD,    0x39)
+     RELOC_NUMBER (R_V810_GPWLO,     0x3a)
+     RELOC_NUMBER (R_V810_GPWHI,     0x3b)
+     RELOC_NUMBER (R_V810_GPWHI1,    0x3c)
+     RELOC_NUMBER (R_V850_HWLO,      0x3d)
+     FAKE_RELOC   (R_V810_reserved1, 0x3e)
+     RELOC_NUMBER (R_V850_EP7BIT,    0x3f)
+     RELOC_NUMBER (R_V850_EPHBYTE,   0x40)
+     RELOC_NUMBER (R_V850_EPWBYTE,   0x41)
+     RELOC_NUMBER (R_V850_REGHWLO,   0x42)
+     FAKE_RELOC   (R_V810_reserved2, 0x43)
+     RELOC_NUMBER (R_V850_GPHWLO,    0x44)
+     FAKE_RELOC   (R_V810_reserved3, 0x45)
+     RELOC_NUMBER (R_V850_PCR22,     0x46)
+     RELOC_NUMBER (R_V850_BLO,       0x47)
+     RELOC_NUMBER (R_V850_EP4BIT,    0x48)
+     RELOC_NUMBER (R_V850_EP5BIT,    0x49)
+     RELOC_NUMBER (R_V850_REGBLO,    0x4a)
+     RELOC_NUMBER (R_V850_GPBLO,     0x4b)
+     RELOC_NUMBER (R_V810_WLO_1,     0x4c)
+     RELOC_NUMBER (R_V810_GPWLO_1,   0x4d)
+     RELOC_NUMBER (R_V850_BLO_1,     0x4e)
+     RELOC_NUMBER (R_V850_HWLO_1,    0x4f)
+     FAKE_RELOC   (R_V810_reserved4, 0x50)
+     RELOC_NUMBER (R_V850_GPBLO_1,   0x51)
+     RELOC_NUMBER (R_V850_GPHWLO_1,  0x52)
+     FAKE_RELOC   (R_V810_reserved5, 0x53)
+     RELOC_NUMBER (R_V850_EPBLO,     0x54)
+     RELOC_NUMBER (R_V850_EPHWLO,    0x55)
+     FAKE_RELOC   (R_V810_reserved6, 0x56)
+     RELOC_NUMBER (R_V850_EPWLO_N,   0x57)
+     RELOC_NUMBER (R_V850_PC32,      0x58)
+     RELOC_NUMBER (R_V850_W23BIT,    0x59)
+     RELOC_NUMBER (R_V850_GPW23BIT,  0x5a)
+     RELOC_NUMBER (R_V850_EPW23BIT,  0x5b)
+     RELOC_NUMBER (R_V850_B23BIT,    0x5c)
+     RELOC_NUMBER (R_V850_GPB23BIT,  0x5d)
+     RELOC_NUMBER (R_V850_EPB23BIT,  0x5e)
+     RELOC_NUMBER (R_V850_PC16U,     0x5f)
+     RELOC_NUMBER (R_V850_PC17,      0x60)
+     RELOC_NUMBER (R_V850_DW8,       0x61)
+     RELOC_NUMBER (R_V850_GPDW8,     0x62)
+     RELOC_NUMBER (R_V850_EPDW8,     0x63)
+     RELOC_NUMBER (R_V850_PC9,       0x64)
+     RELOC_NUMBER (R_V810_REGBYTE,   0x65)
+     RELOC_NUMBER (R_V810_REGHWORD,  0x66)
+     RELOC_NUMBER (R_V810_REGWORD,   0x67)
+     RELOC_NUMBER (R_V810_REGWLO,    0x68)
+     RELOC_NUMBER (R_V810_REGWHI,    0x69)
+     RELOC_NUMBER (R_V810_REGWHI1,   0x6a)
+     RELOC_NUMBER (R_V850_REGW23BIT, 0x6b)
+     RELOC_NUMBER (R_V850_REGB23BIT, 0x6c)
+     RELOC_NUMBER (R_V850_REGDW8,    0x6d)
+     RELOC_NUMBER (R_V810_EPBYTE,    0x6e)
+     RELOC_NUMBER (R_V810_EPHWORD,   0x6f)
+     RELOC_NUMBER (R_V810_EPWORD,    0x70)
+     RELOC_NUMBER (R_V850_WLO23,     0x71)
+     RELOC_NUMBER (R_V850_WORD_E,    0x72)
+     RELOC_NUMBER (R_V850_REGWORD_E, 0x73)
+     RELOC_NUMBER (R_V850_WORD,      0x74)
+     RELOC_NUMBER (R_V850_GPWORD,    0x75)
+     RELOC_NUMBER (R_V850_REGWORD,   0x76)
+     RELOC_NUMBER (R_V850_EPWORD,    0x77)
+     RELOC_NUMBER (R_V810_TPBYTE,    0x78)
+     RELOC_NUMBER (R_V810_TPHWORD,   0x79)
+     RELOC_NUMBER (R_V810_TPWORD,    0x7a)
+     RELOC_NUMBER (R_V810_TPWLO,     0x7b)
+     RELOC_NUMBER (R_V810_TPWHI,     0x7c)
+     RELOC_NUMBER (R_V810_TPWHI1,    0x7d)
+     RELOC_NUMBER (R_V850_TPHWLO,    0x7e)
+     RELOC_NUMBER (R_V850_TPBLO,     0x7f)
+     RELOC_NUMBER (R_V810_TPWLO_1,   0x80)
+     RELOC_NUMBER (R_V850_TPBLO_1,   0x81)
+     RELOC_NUMBER (R_V850_TPHWLO_1,  0x82)
+     RELOC_NUMBER (R_V850_TP23BIT,   0x83)
+     RELOC_NUMBER (R_V850_TPW23BIT,  0x84)
+     RELOC_NUMBER (R_V850_TPDW8,     0x85)
+
+/* These are defined by the RH850 ABI, but not used.  */
+     RELOC_NUMBER (R_V810_ABS32,     0xa0)
+     RELOC_NUMBER (R_V850_SYM,       0xe0)
+     RELOC_NUMBER (R_V850_OPadd,     0xe1)
+     RELOC_NUMBER (R_V850_OPsub,     0xe2)
+     RELOC_NUMBER (R_V850_OPsctsize, 0xe3)
+     RELOC_NUMBER (R_V850_OPscttop,  0xe4)
+
+END_RELOC_NUMBERS (R_V800_max)
+
 #endif /* _ELF_V850_H */
diff -urpN include/elf.mm/x86-64.h include/elf/x86-64.h
--- include/elf.mm/x86-64.h	2011-08-12 22:33:34.000000000 +0200
+++ include/elf/x86-64.h	2014-11-24 18:14:54.000000000 +0100
@@ -59,11 +58,11 @@ START_RELOC_NUMBERS (elf_x86_64_reloc_ty
      						 offset to GOT entry */
      RELOC_NUMBER (R_X86_64_GOTPC64,  29)     /* 64 bit signed pc relative
      						 offset to GOT */
-     RELOC_NUMBER (R_X86_64_GOTPLT64, 30)     /* like GOT64, but indicates
-     						 that PLT entry is needed */
+     RELOC_NUMBER (R_X86_64_GOTPLT64, 30)     /* Obsolete. The same as GOT64. */
      RELOC_NUMBER (R_X86_64_PLTOFF64, 31)     /* 64 bit GOT relative offset
      						 to PLT entry */
-     /* 32 .. 33 */
+     RELOC_NUMBER (R_X86_64_SIZE32,   32)     /* 32-bit symbol size */
+     RELOC_NUMBER (R_X86_64_SIZE64,   33)     /* 64-bit symbol size */
      RELOC_NUMBER (R_X86_64_GOTPC32_TLSDESC, 34)
 					      /* 32 bit signed pc relative
 						 offset to TLS descriptor
@@ -73,6 +72,10 @@ START_RELOC_NUMBERS (elf_x86_64_reloc_ty
      RELOC_NUMBER (R_X86_64_TLSDESC, 36)      /* 2x64-bit TLS descriptor.  */
      RELOC_NUMBER (R_X86_64_IRELATIVE, 37)    /* Adjust indirectly by program base */
      RELOC_NUMBER (R_X86_64_RELATIVE64, 38)   /* 64bit adjust by program base */
+     RELOC_NUMBER (R_X86_64_PC32_BND, 39)      /* PC relative 32 bit
+						  signed with BND prefix  */
+     RELOC_NUMBER (R_X86_64_PLT32_BND, 40)     /* 32 bit PLT address with
+						  BND prefix */
      RELOC_NUMBER (R_X86_64_GNU_VTINHERIT, 250)       /* GNU C++ hack  */
      RELOC_NUMBER (R_X86_64_GNU_VTENTRY, 251)         /* GNU C++ hack  */
 END_RELOC_NUMBERS (R_X86_64_max)
