This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Add support for the WebAssembly file format and the wasm32 ELF conversion to gas and the binutils.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f96bd6c2d7a3801fabbf9d834f7a29b752aa7532

commit f96bd6c2d7a3801fabbf9d834f7a29b752aa7532
Author: Pip Cet <pipcet@gmail.com>
Date:   Thu Mar 30 10:57:21 2017 +0100

    Add support for the WebAssembly file format and the wasm32 ELF conversion to gas and the binutils.
    
    binutils * readelf.c: Add support for wasm32 ELF format WebAssembly files.
    	(guess_is_rela): Likewise.
    	(dump_relocations): Likewise.
    	(is_32bit_abs_reloc): Likewise.
    	(is_none_reloc_): Likewise.
    	* NEWS: Mention the new support.
    	* testsuite/lib/binutils-common.exp (is_elf_format): Mark wasm32
    	as ELF target.
    	(supports_gnu_unique): Mark wasm32 as supporting STB_GNU_UNIQUE.
    	* testsuite/binutils-all/nm.exp: Mark wasm32 as requiring .size annotations.
    	* testsuite/binutils-all/wasm32: New directory.
    	* testsuite/binutils-all/wasm32/create-wasm.d: New file.
    	* testsuite/binutils-all/wasm32/create-wasm.s: Likewise.
    	* testsuite/binutils-all/wasm32/custom-section.d: Likewise.
    	* testsuite/binutils-all/wasm32/custom-section.s: Likewise.
    	* testsuite/binutils-all/wasm32/invalid-wasm-1.d: Likewise.
    	* testsuite/binutils-all/wasm32/invalid-wasm-1.s: Likewise.
    	* testsuite/binutils-all/wasm32/long-sections.d: Likewise.
    	* testsuite/binutils-all/wasm32/long-sections.s: Likewise.
    	* testsuite/binutils-all/wasm32/parse-wasm.d: Likewise.
    	* testsuite/binutils-all/wasm32/parse-wasm.s: Likewise.
    	* testsuite/binutils-all/wasm32/parse-wasm-2.d: Likewise.
    	* testsuite/binutils-all/wasm32/parse-wasm-2.s: Likewise.
    	* testsuite/binutils-all/wasm32/prepared-section.d: Likewise.
    	* testsuite/binutils-all/wasm32/prepared-section.s: Likewise.
    	* testsuite/binutils-all/wasm32/wasm32.exp: New file, run tests.
    
    gas	* config/tc-wasm32.h: New file: Add WebAssembly assembler target.
    	* config/tc-wasm32.c: New file: Add WebAssembly assembler target.
    	* Makefile.am: Add WebAssembly assembler target.
    	* configure.tgt: Add WebAssembly assembler target.
    	* doc/c-wasm32.texi: New file: Start documenting WebAssembly
    	assembler.
    	* doc/all.texi: Define WASM32.
    	* doc/as.texinfo: Add WebAssembly entries.
    	* NEWS: Mention the new support.
    	* Makefile.in: Regenerate.
    	* po/gas.pot: Regenerate.
    	* po/POTFILES.in: Regenerate.
    	* testsuite/gas/wasm32: New directory.
    	* testsuite/gas/wasm32/allinsn.d: New file.
    	* testsuite/gas/wasm32/allinsn.s: New file.
    	* testsuite/gas/wasm32/illegal.l: New file.
    	* testsuite/gas/wasm32/illegal.s: New file.
    	* testsuite/gas/wasm32/illegal-2.l: New file.
    	* testsuite/gas/wasm32/illegal-2.s: New file.
    	* testsuite/gas/wasm32/illegal-3.l: New file.
    	* testsuite/gas/wasm32/illegal-3.s: New file.
    	* testsuite/gas/wasm32/illegal-4.l: New file.
    	* testsuite/gas/wasm32/illegal-4.s: New file.
    	* testsuite/gas/wasm32/illegal-5.l: New file.
    	* testsuite/gas/wasm32/illegal-5.s: New file.
    	* testsuite/gas/wasm32/illegal-6.l: New file.
    	* testsuite/gas/wasm32/illegal-6.s: New file.
    	* testsuite/gas/wasm32/illegal-7.l: New file.
    	* testsuite/gas/wasm32/illegal-7.s: New file.
    	* testsuite/gas/wasm32/illegal-8.l: New file.
    	* testsuite/gas/wasm32/illegal-8.s: New file.
    	* testsuite/gas/wasm32/illegal-9.l: New file.
    	* testsuite/gas/wasm32/illegal-9.s: New file.
    	* testsuite/gas/wasm32/illegal-10.l: New file.
    	* testsuite/gas/wasm32/illegal-10.s: New file.
    	* testsuite/gas/wasm32/illegal-11.l: New file.
    	* testsuite/gas/wasm32/illegal-11.s: New file.
    	* testsuite/gas/wasm32/illegal-12.l: New file.
    	* testsuite/gas/wasm32/illegal-12.s: New file.
    	* testsuite/gas/wasm32/illegal-13.l: New file.
    	* testsuite/gas/wasm32/illegal-13.s: New file.
    	* testsuite/gas/wasm32/illegal-14.l: New file.
    	* testsuite/gas/wasm32/illegal-14.s: New file.
    	* testsuite/gas/wasm32/illegal-15.l: New file.
    	* testsuite/gas/wasm32/illegal-15.s: New file.
    	* testsuite/gas/wasm32/illegal-16.l: New file.
    	* testsuite/gas/wasm32/illegal-16.s: New file.
    	* testsuite/gas/wasm32/illegal-17.l: New file.
    	* testsuite/gas/wasm32/illegal-17.s: New file.
    	* testsuite/gas/wasm32/illegal-18.l: New file.
    	* testsuite/gas/wasm32/illegal-18.s: New file.
    	* testsuite/gas/wasm32/illegal-19.l: New file.
    	* testsuite/gas/wasm32/illegal-19.s: New file.
    	* testsuite/gas/wasm32/illegal-20.l: New file.
    	* testsuite/gas/wasm32/illegal-20.s: New file.
    	* testsuite/gas/wasm32/illegal-21.l: New file.
    	* testsuite/gas/wasm32/illegal-21.s: New file.
    	* testsuite/gas/wasm32/illegal-22.l: New file.
    	* testsuite/gas/wasm32/illegal-22.s: New file.
    	* testsuite/gas/wasm32/illegal-24.l: New file.
    	* testsuite/gas/wasm32/illegal-24.s: New file.
    	* testsuite/gas/wasm32/illegal-25.l: New file.
    	* testsuite/gas/wasm32/illegal-25.s: New file.
    	* testsuite/gas/wasm32/reloc.d: New file.
    	* testsuite/gas/wasm32/reloc.s: New file.
    	* testsuite/gas/wasm32/wasm32.exp: New tests for WebAssembly
    	architecture.
    
    opcodes * configure.ac: Add (empty) bfd_wasm32_arch target.
    	* configure: Regenerate
    	* po/opcodes.pot: Regenerate.
    
    include	* opcode/wasm.h: New file to support wasm32 architecture.
    	* elf/wasm32.h: Add R_WASM32_32 relocation.
    
    bfd	* elf32-wasm32.c: Add relocation code, two relocs.
    	* reloc.c: Add wasm32 relocations.
    	* libbfd.h: Regenerate.
    	* bfd-in2.h: Regenerate.
    	* bfd/po/bfd.pot: Regenerate.

Diff:
---
 bfd/ChangeLog                                      |    8 +
 bfd/bfd-in2.h                                      |   12 +
 bfd/elf32-wasm32.c                                 |  107 +-
 bfd/libbfd.h                                       |   10 +
 bfd/po/bfd.pot                                     |   57 +-
 bfd/reloc.c                                        |   23 +
 binutils/ChangeLog                                 |   29 +
 binutils/NEWS                                      |    2 +
 binutils/readelf.c                                 |    9 +
 binutils/testsuite/binutils-all/nm.exp             |    3 +-
 .../testsuite/binutils-all/wasm32/create-wasm.d    |   10 +
 .../testsuite/binutils-all/wasm32/create-wasm.s    |    6 +
 .../testsuite/binutils-all/wasm32/custom-section.d |   11 +
 .../testsuite/binutils-all/wasm32/custom-section.s |    4 +
 .../testsuite/binutils-all/wasm32/invalid-wasm-1.d |    6 +
 .../testsuite/binutils-all/wasm32/invalid-wasm-1.s |    7 +
 .../testsuite/binutils-all/wasm32/invalid-wasm-2.d |    6 +
 .../testsuite/binutils-all/wasm32/invalid-wasm-2.s |    7 +
 .../testsuite/binutils-all/wasm32/long-sections.d  |   13 +
 .../testsuite/binutils-all/wasm32/long-sections.s  |    9 +
 .../testsuite/binutils-all/wasm32/parse-wasm-2.d   |   15 +
 .../testsuite/binutils-all/wasm32/parse-wasm-2.s   |   43 +
 .../testsuite/binutils-all/wasm32/parse-wasm.d     |    8 +
 .../testsuite/binutils-all/wasm32/parse-wasm.s     |    7 +
 .../binutils-all/wasm32/prepared-section.d         |   10 +
 .../binutils-all/wasm32/prepared-section.s         |    6 +
 binutils/testsuite/binutils-all/wasm32/wasm32.exp  |   30 +
 binutils/testsuite/lib/binutils-common.exp         |    4 +
 gas/ChangeLog                                      |   70 +
 gas/Makefile.am                                    |    2 +
 gas/Makefile.in                                    |   17 +
 gas/NEWS                                           |    2 +
 gas/config/tc-wasm32.c                             |  821 +++++
 gas/config/tc-wasm32.h                             |   89 +
 gas/configure.tgt                                  |    3 +
 gas/doc/all.texi                                   |    1 +
 gas/doc/as.texinfo                                 |    9 +-
 gas/doc/c-wasm32.texi                              |  119 +
 gas/po/POTFILES.in                                 |    2 +
 gas/po/gas.pot                                     | 3486 ++++++++++----------
 gas/testsuite/gas/wasm32/allinsn.d                 |  198 ++
 gas/testsuite/gas/wasm32/allinsn.s                 |  171 +
 gas/testsuite/gas/wasm32/illegal-10.l              |    3 +
 gas/testsuite/gas/wasm32/illegal-10.s              |    1 +
 gas/testsuite/gas/wasm32/illegal-11.l              |    3 +
 gas/testsuite/gas/wasm32/illegal-11.s              |    1 +
 gas/testsuite/gas/wasm32/illegal-12.l              |    3 +
 gas/testsuite/gas/wasm32/illegal-12.s              |    1 +
 gas/testsuite/gas/wasm32/illegal-13.l              |    3 +
 gas/testsuite/gas/wasm32/illegal-13.s              |    1 +
 gas/testsuite/gas/wasm32/illegal-14.l              |    3 +
 gas/testsuite/gas/wasm32/illegal-14.s              |    1 +
 gas/testsuite/gas/wasm32/illegal-15.l              |    3 +
 gas/testsuite/gas/wasm32/illegal-15.s              |    1 +
 gas/testsuite/gas/wasm32/illegal-16.l              |    3 +
 gas/testsuite/gas/wasm32/illegal-16.s              |    1 +
 gas/testsuite/gas/wasm32/illegal-17.l              |    3 +
 gas/testsuite/gas/wasm32/illegal-17.s              |    1 +
 gas/testsuite/gas/wasm32/illegal-18.l              |    3 +
 gas/testsuite/gas/wasm32/illegal-18.s              |    1 +
 gas/testsuite/gas/wasm32/illegal-19.l              |    3 +
 gas/testsuite/gas/wasm32/illegal-19.s              |    1 +
 gas/testsuite/gas/wasm32/illegal-2.l               |    3 +
 gas/testsuite/gas/wasm32/illegal-2.s               |    1 +
 gas/testsuite/gas/wasm32/illegal-20.l              |    3 +
 gas/testsuite/gas/wasm32/illegal-20.s              |    1 +
 gas/testsuite/gas/wasm32/illegal-21.l              |    3 +
 gas/testsuite/gas/wasm32/illegal-21.s              |    1 +
 gas/testsuite/gas/wasm32/illegal-22.l              |    3 +
 gas/testsuite/gas/wasm32/illegal-24.l              |    3 +
 gas/testsuite/gas/wasm32/illegal-24.s              |    1 +
 gas/testsuite/gas/wasm32/illegal-25.l              |    3 +
 gas/testsuite/gas/wasm32/illegal-25.s              |    1 +
 gas/testsuite/gas/wasm32/illegal-3.l               |    3 +
 gas/testsuite/gas/wasm32/illegal-3.s               |    1 +
 gas/testsuite/gas/wasm32/illegal-4.l               |    3 +
 gas/testsuite/gas/wasm32/illegal-4.s               |    1 +
 gas/testsuite/gas/wasm32/illegal-5.l               |    3 +
 gas/testsuite/gas/wasm32/illegal-5.s               |    1 +
 gas/testsuite/gas/wasm32/illegal-6.l               |    3 +
 gas/testsuite/gas/wasm32/illegal-6.s               |    1 +
 gas/testsuite/gas/wasm32/illegal-7.l               |    3 +
 gas/testsuite/gas/wasm32/illegal-7.s               |    1 +
 gas/testsuite/gas/wasm32/illegal-8.l               |    3 +
 gas/testsuite/gas/wasm32/illegal-8.s               |    1 +
 gas/testsuite/gas/wasm32/illegal-9.l               |    3 +
 gas/testsuite/gas/wasm32/illegal-9.s               |    1 +
 gas/testsuite/gas/wasm32/illegal.l                 |    3 +
 gas/testsuite/gas/wasm32/illegal.s                 |    1 +
 gas/testsuite/gas/wasm32/reloc.d                   |   18 +
 gas/testsuite/gas/wasm32/reloc.s                   |    3 +
 gas/testsuite/gas/wasm32/wasm32.exp                |   58 +
 include/ChangeLog                                  |    5 +
 include/elf/wasm32.h                               |    2 +
 include/opcode/wasm.h                              |  226 ++
 opcodes/ChangeLog                                  |    6 +
 opcodes/configure                                  |    1 +
 opcodes/configure.ac                               |    1 +
 opcodes/po/opcodes.pot                             |  339 +-
 99 files changed, 4355 insertions(+), 1851 deletions(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 42ffd4d..bb851c7 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,11 @@
+2017-03-30  Pip Cet  <pipcet@gmail.com>
+
+	* elf32-wasm32.c: Add relocation code, two relocs.
+	* reloc.c: Add wasm32 relocations.
+	* libbfd.h: Regenerate.
+	* bfd-in2.h: Regenerate.
+	* bfd/po/bfd.pot: Regenerate.
+
 2017-03-29  Nick Clifton  <nickc@redhat.com>
 
 	PR binutils/18025
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index adfcefd..fbd379f 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -6464,6 +6464,18 @@ assembler and not (currently) written to any object files.  */
   BFD_RELOC_VISIUM_HI16_PCREL,
   BFD_RELOC_VISIUM_LO16_PCREL,
   BFD_RELOC_VISIUM_IM16_PCREL,
+
+/* WebAssembly relocations.  */
+  BFD_RELOC_WASM32_LEB128,
+  BFD_RELOC_WASM32_LEB128_GOT,
+  BFD_RELOC_WASM32_LEB128_GOT_CODE,
+  BFD_RELOC_WASM32_LEB128_PLT,
+  BFD_RELOC_WASM32_PLT_INDEX,
+  BFD_RELOC_WASM32_ABS32_CODE,
+  BFD_RELOC_WASM32_COPY,
+  BFD_RELOC_WASM32_CODE_POINTER,
+  BFD_RELOC_WASM32_INDEX,
+  BFD_RELOC_WASM32_PLT_SIG,
   BFD_RELOC_UNUSED };
 
 typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
diff --git a/bfd/elf32-wasm32.c b/bfd/elf32-wasm32.c
index 9b38272..6d2e04e 100644
--- a/bfd/elf32-wasm32.c
+++ b/bfd/elf32-wasm32.c
@@ -23,8 +23,108 @@
 #include "libbfd.h"
 #include "elf-bfd.h"
 #include "bfd_stdint.h"
+#include "libiberty.h"
 #include "elf/wasm32.h"
 
+static reloc_howto_type elf32_wasm32_howto_table[] =
+{
+  HOWTO (R_WASM32_NONE,		/* type */
+         0,			/* rightshift */
+         3,			/* size (0 = byte, 1 = short, 2 = long) */
+         0,			/* bitsize */
+         FALSE,			/* pc_relative */
+         0,			/* bitpos */
+         complain_overflow_dont,/* complain_on_overflow */
+         bfd_elf_generic_reloc,	/* special_function */
+         "R_WASM32_NONE",	/* name */
+         FALSE,			/* partial_inplace */
+         0,			/* src_mask */
+         0,			/* dst_mask */
+         FALSE),		/* pcrel_offset */
+
+  /* 32 bit absolute */
+  HOWTO (R_WASM32_32,		/* type */
+         0,			/* rightshift */
+         2,			/* size (0 = byte, 1 = short, 2 = long) */
+         32,			/* bitsize */
+         FALSE,			/* pc_relative */
+         0,			/* bitpos */
+         complain_overflow_bitfield,/* complain_on_overflow */
+         bfd_elf_generic_reloc,	/* special_function */
+         "R_WASM32_32",	/* name */
+         FALSE,			/* partial_inplace */
+         0xffffffff,		/* src_mask */
+         0xffffffff,		/* dst_mask */
+         FALSE),		/* pcrel_offset */
+};
+
+/* Look up the relocation CODE.  */
+
+static reloc_howto_type *
+elf32_wasm32_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+                                bfd_reloc_code_real_type code)
+{
+  switch (code)
+    {
+    case BFD_RELOC_NONE:
+      return &elf32_wasm32_howto_table[R_WASM32_NONE];
+    case BFD_RELOC_32:
+      return &elf32_wasm32_howto_table[R_WASM32_32];
+    default:
+      break;
+    }
+
+  return NULL;
+}
+
+/* Look up the relocation R_NAME.  */
+
+static reloc_howto_type *
+elf32_wasm32_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+                                const char *r_name)
+{
+  unsigned int i;
+
+  for (i = 0; i < ARRAY_SIZE (elf32_wasm32_howto_table); i++)
+    if (elf32_wasm32_howto_table[i].name != NULL
+        && strcasecmp (elf32_wasm32_howto_table[i].name, r_name) == 0)
+      return &elf32_wasm32_howto_table[i];
+
+  return NULL;
+}
+
+/* Look up the relocation R_TYPE.  */
+
+static reloc_howto_type *
+elf32_wasm32_rtype_to_howto (bfd *abfd, unsigned r_type)
+{
+  unsigned int i = r_type;
+
+  if (i >= ARRAY_SIZE (elf32_wasm32_howto_table))
+    {
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: invalid relocation type %d"),
+			  abfd, (int) r_type);
+      i = R_WASM32_NONE;
+    }
+
+  if (elf32_wasm32_howto_table[i].type != r_type)
+    return NULL;
+
+  return &elf32_wasm32_howto_table[i];
+}
+
+/* Translate the ELF-internal relocation RELA into CACHE_PTR.  */
+
+static void
+elf32_wasm32_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
+                                arelent *cache_ptr,
+                                Elf_Internal_Rela *dst)
+{
+  unsigned int r_type = ELF32_R_TYPE (dst->r_info);
+  cache_ptr->howto = elf32_wasm32_rtype_to_howto (abfd, r_type);
+}
+
 #define ELF_ARCH		bfd_arch_wasm32
 #define ELF_TARGET_ID		EM_WEBASSEMBLY
 #define ELF_MACHINE_CODE	EM_WEBASSEMBLY
@@ -40,8 +140,11 @@
 /* For testing. */
 #define elf_backend_want_dynrelro       1
 
-#define bfd_elf32_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
-#define bfd_elf32_bfd_reloc_name_lookup _bfd_norelocs_bfd_reloc_name_lookup
+#define elf_info_to_howto		elf32_wasm32_info_to_howto_rela
+#define elf_info_to_howto_rel		NULL
+
+#define bfd_elf32_bfd_reloc_type_lookup elf32_wasm32_reloc_type_lookup
+#define bfd_elf32_bfd_reloc_name_lookup elf32_wasm32_reloc_name_lookup
 
 #define ELF_DYNAMIC_INTERPRETER  "/sbin/elf-dynamic-interpreter.so"
 
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 1b6ca52..8bac650 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -3166,6 +3166,16 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
   "BFD_RELOC_VISIUM_HI16_PCREL",
   "BFD_RELOC_VISIUM_LO16_PCREL",
   "BFD_RELOC_VISIUM_IM16_PCREL",
+  "BFD_RELOC_WASM32_LEB128",
+  "BFD_RELOC_WASM32_LEB128_GOT",
+  "BFD_RELOC_WASM32_LEB128_GOT_CODE",
+  "BFD_RELOC_WASM32_LEB128_PLT",
+  "BFD_RELOC_WASM32_PLT_INDEX",
+  "BFD_RELOC_WASM32_ABS32_CODE",
+  "BFD_RELOC_WASM32_COPY",
+  "BFD_RELOC_WASM32_CODE_POINTER",
+  "BFD_RELOC_WASM32_INDEX",
+  "BFD_RELOC_WASM32_PLT_SIG",
  "@@overflow: BFD_RELOC_UNUSED@@",
 };
 #endif
diff --git a/bfd/po/bfd.pot b/bfd/po/bfd.pot
index 70249f8..2b2bec5 100644
--- a/bfd/po/bfd.pot
+++ b/bfd/po/bfd.pot
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: bug-binutils@gnu.org\n"
-"POT-Creation-Date: 2017-03-27 11:46+0100\n"
+"POT-Creation-Date: 2017-03-29 17:07+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -206,7 +206,7 @@ msgid "Warning: Writing section `%s' at huge (ie negative) file offset 0x%lx."
 msgstr ""
 
 #: bout.c:1142 elf-m10300.c:2651 elf32-avr.c:2452 elf32-frv.c:5633
-#: elf64-ia64-vms.c:353 elfxx-sparc.c:2876 reloc.c:7981 reloc16.c:156
+#: elf64-ia64-vms.c:353 elfxx-sparc.c:2876 reloc.c:8004 reloc16.c:156
 #: elf32-ia64.c:351 elf64-ia64.c:351
 msgid "%P%F: --relax and -r may not be used together\n"
 msgstr ""
@@ -617,16 +617,16 @@ msgstr ""
 msgid "<corrupt info> %s"
 msgstr ""
 
-#: coffgen.c:2638 elflink.c:13940 linker.c:2931
+#: coffgen.c:2666 elflink.c:13940 linker.c:2931
 msgid "%F%P: already_linked_table: %E\n"
 msgstr ""
 
-#: coffgen.c:2965 elflink.c:12981
+#: coffgen.c:2993 elflink.c:12981
 #, c-format
 msgid "Removing unused section '%s' in file '%B'"
 msgstr ""
 
-#: coffgen.c:3041 elflink.c:13219
+#: coffgen.c:3069 elflink.c:13219
 msgid "Warning: gc-sections option ignored"
 msgstr ""
 
@@ -736,26 +736,26 @@ msgstr ""
 msgid "Dwarf Error: Unable to read alt ref %u."
 msgstr ""
 
-#: dwarf2.c:2600 dwarf2.c:2745 dwarf2.c:3063
+#: dwarf2.c:2600 dwarf2.c:2750 dwarf2.c:3071
 #, c-format
 msgid "Dwarf Error: Could not find abbrev number %u."
 msgstr ""
 
-#: dwarf2.c:3015
+#: dwarf2.c:3023
 #, c-format
 msgid ""
 "Dwarf Error: found dwarf version '%u', this reader only handles version 2, 3 "
 "and 4 information."
 msgstr ""
 
-#: dwarf2.c:3026
+#: dwarf2.c:3034
 #, c-format
 msgid ""
 "Dwarf Error: found address size '%u', this reader can not handle sizes "
 "greater than '%u'."
 msgstr ""
 
-#: dwarf2.c:3129
+#: dwarf2.c:3137
 msgid ""
 "Dwarf Error: DW_AT_comp_dir attribute encountered with a non-string form."
 msgstr ""
@@ -1680,7 +1680,7 @@ msgstr ""
 #. Ignore init flag - it may not be set, despite the flags field containing valid data.
 #. Ignore init flag - it may not be set, despite the flags field
 #. containing valid data.
-#: elf32-arm.c:14101 elf32-bfin.c:4919 elf32-cris.c:4084 elf32-m68hc1x.c:1413
+#: elf32-arm.c:14101 elf32-bfin.c:4919 elf32-cris.c:4089 elf32-m68hc1x.c:1413
 #: elf32-m68k.c:1200 elf32-score.c:4009 elf32-score7.c:3818 elf32-vax.c:536
 #: elf32-xgate.c:669 elfxx-mips.c:15782
 #: /work/sources/binutils/current/bfd/elfnn-aarch64.c:6695
@@ -2072,14 +2072,14 @@ msgid ""
 "-mno-small-tls)"
 msgstr ""
 
-#: elf32-cris.c:3231
+#: elf32-cris.c:3233
 #, c-format
 msgid ""
 "%B, section %A:\n"
 "  v10/v32 compatible object %s must not contain a PIC relocation"
 msgstr ""
 
-#: elf32-cris.c:3285
+#: elf32-cris.c:3287
 #, c-format
 msgid ""
 "%B, section %A:\n"
@@ -2087,52 +2087,52 @@ msgid ""
 "recompile with -fPIC"
 msgstr ""
 
-#: elf32-cris.c:3500
+#: elf32-cris.c:3505
 #, c-format
 msgid ""
 "%B, section %A:\n"
 "  relocation %s should not be used in a shared object; recompile with -fPIC"
 msgstr ""
 
-#: elf32-cris.c:3924
+#: elf32-cris.c:3929
 #, c-format
 msgid ""
 "%B, section `%A', to symbol `%s':\n"
 "  relocation %s should not be used in a shared object; recompile with -fPIC"
 msgstr ""
 
-#: elf32-cris.c:4036
+#: elf32-cris.c:4041
 msgid "Unexpected machine number"
 msgstr ""
 
-#: elf32-cris.c:4087
+#: elf32-cris.c:4092
 #, c-format
 msgid " [symbols have a _ prefix]"
 msgstr ""
 
-#: elf32-cris.c:4090
+#: elf32-cris.c:4095
 #, c-format
 msgid " [v10 and v32]"
 msgstr ""
 
-#: elf32-cris.c:4093
+#: elf32-cris.c:4098
 #, c-format
 msgid " [v32]"
 msgstr ""
 
-#: elf32-cris.c:4137
+#: elf32-cris.c:4142
 msgid "%B: uses _-prefixed symbols, but writing file with non-prefixed symbols"
 msgstr ""
 
-#: elf32-cris.c:4138
+#: elf32-cris.c:4143
 msgid "%B: uses non-prefixed symbols, but writing file with _-prefixed symbols"
 msgstr ""
 
-#: elf32-cris.c:4157
+#: elf32-cris.c:4162
 msgid "%B contains CRIS v32 code, incompatible with previous objects"
 msgstr ""
 
-#: elf32-cris.c:4159
+#: elf32-cris.c:4164
 msgid "%B contains non-CRIS-v32 code, incompatible with previous objects"
 msgstr ""
 
@@ -2356,7 +2356,8 @@ msgstr ""
 
 #. Unknown relocation.
 #: elf32-i386.c:387 elf32-m68k.c:352 elf32-ppc.c:2074 elf32-s390.c:346
-#: elf32-tic6x.c:2674 elf64-ppc.c:2515 elf64-s390.c:372 elf64-x86-64.c:289
+#: elf32-tic6x.c:2674 elf32-wasm32.c:106 elf64-ppc.c:2515 elf64-s390.c:372
+#: elf64-x86-64.c:289
 #, c-format
 msgid "%B: invalid relocation type %d"
 msgstr ""
@@ -2947,7 +2948,7 @@ msgstr ""
 msgid "%B: Unmatched OMIT_FP in %A."
 msgstr ""
 
-#: elf32-nds32.c:13026 reloc.c:8192
+#: elf32-nds32.c:13026 reloc.c:8215
 #, c-format
 msgid "%X%P: %B(%A): relocation \"%R\" goes out of range\n"
 msgstr ""
@@ -5841,21 +5842,21 @@ msgstr ""
 msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
 msgstr ""
 
-#: reloc.c:8028
+#: reloc.c:8051
 msgid "INPUT_SECTION_FLAGS are not supported.\n"
 msgstr ""
 
-#: reloc.c:8126
+#: reloc.c:8149
 #, c-format
 msgid "%X%P: %B(%A): error: relocation for offset %V has no value\n"
 msgstr ""
 
-#: reloc.c:8202
+#: reloc.c:8225
 #, c-format
 msgid "%X%P: %B(%A): relocation \"%R\" is not supported\n"
 msgstr ""
 
-#: reloc.c:8211
+#: reloc.c:8234
 #, c-format
 msgid "%X%P: %B(%A): relocation \"%R\" returns an unrecognized value %x\n"
 msgstr ""
diff --git a/bfd/reloc.c b/bfd/reloc.c
index d4229a4..2791458 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -7853,6 +7853,29 @@ ENUMX
 ENUMDOC
   Visium Relocations.
 
+ENUM
+  BFD_RELOC_WASM32_LEB128
+ENUMX
+  BFD_RELOC_WASM32_LEB128_GOT
+ENUMX
+  BFD_RELOC_WASM32_LEB128_GOT_CODE
+ENUMX
+  BFD_RELOC_WASM32_LEB128_PLT
+ENUMX
+  BFD_RELOC_WASM32_PLT_INDEX
+ENUMX
+  BFD_RELOC_WASM32_ABS32_CODE
+ENUMX
+  BFD_RELOC_WASM32_COPY
+ENUMX
+  BFD_RELOC_WASM32_CODE_POINTER
+ENUMX
+  BFD_RELOC_WASM32_INDEX
+ENUMX
+  BFD_RELOC_WASM32_PLT_SIG
+ENUMDOC
+  WebAssembly relocations.
+
 ENDSENUM
   BFD_RELOC_UNUSED
 CODE_FRAGMENT
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 9559587..767e315 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,32 @@
+2017-03-30  Pip Cet  <pipcet@gmail.com>
+
+	* readelf.c: Add support for wasm32 ELF format WebAssembly files.
+	(guess_is_rela): Likewise.
+	(dump_relocations): Likewise.
+	(is_32bit_abs_reloc): Likewise.
+	(is_none_reloc_): Likewise.
+	* NEWS: Mention the new support.
+	* testsuite/lib/binutils-common.exp (is_elf_format): Mark wasm32
+	as ELF target.
+	(supports_gnu_unique): Mark wasm32 as supporting STB_GNU_UNIQUE.
+	* testsuite/binutils-all/nm.exp: Mark wasm32 as requiring .size annotations.
+	* testsuite/binutils-all/wasm32: New directory.
+	* testsuite/binutils-all/wasm32/create-wasm.d: New file.
+	* testsuite/binutils-all/wasm32/create-wasm.s: Likewise.
+	* testsuite/binutils-all/wasm32/custom-section.d: Likewise.
+	* testsuite/binutils-all/wasm32/custom-section.s: Likewise.
+	* testsuite/binutils-all/wasm32/invalid-wasm-1.d: Likewise.
+	* testsuite/binutils-all/wasm32/invalid-wasm-1.s: Likewise.
+	* testsuite/binutils-all/wasm32/long-sections.d: Likewise.
+	* testsuite/binutils-all/wasm32/long-sections.s: Likewise.
+	* testsuite/binutils-all/wasm32/parse-wasm.d: Likewise.
+	* testsuite/binutils-all/wasm32/parse-wasm.s: Likewise.
+	* testsuite/binutils-all/wasm32/parse-wasm-2.d: Likewise.
+	* testsuite/binutils-all/wasm32/parse-wasm-2.s: Likewise.
+	* testsuite/binutils-all/wasm32/prepared-section.d: Likewise.
+	* testsuite/binutils-all/wasm32/prepared-section.s: Likewise.
+	* testsuite/binutils-all/wasm32/wasm32.exp: New file, run tests.
+
 2017-03-29  Alan Modra  <amodra@gmail.com>
 
 	* doc/binutils.texi (objdump): Document PowerPC -M options.
diff --git a/binutils/NEWS b/binutils/NEWS
index c98908a..1b824fa 100644
--- a/binutils/NEWS
+++ b/binutils/NEWS
@@ -1,5 +1,7 @@
 -*- text -*-
 
+* Add support for the wasm32 ELF conversion of the Web Assembly file format.
+
 * Add --inlines option to objdump, which extends the --line-numbers option
   so that inlined functions will display their nesting information.
 
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 6ede239..31a519b 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -151,6 +151,7 @@
 #include "elf/v850.h"
 #include "elf/vax.h"
 #include "elf/visium.h"
+#include "elf/wasm32.h"
 #include "elf/x86-64.h"
 #include "elf/xc16x.h"
 #include "elf/xgate.h"
@@ -809,6 +810,7 @@ guess_is_rela (unsigned int e_machine)
     case EM_XTENSA_OLD:
     case EM_MICROBLAZE:
     case EM_MICROBLAZE_OLD:
+    case EM_WEBASSEMBLY:
       return TRUE;
 
     case EM_68HC05:
@@ -1498,6 +1500,10 @@ dump_relocations (FILE * file,
 	  rtype = elf_tilepro_reloc_type (type);
 	  break;
 
+	case EM_WEBASSEMBLY:
+	  rtype = elf_wasm32_reloc_type (type);
+	  break;
+
 	case EM_XGATE:
 	  rtype = elf_xgate_reloc_type (type);
 	  break;
@@ -12091,6 +12097,8 @@ is_32bit_abs_reloc (unsigned int reloc_type)
       return reloc_type == 1; /* R_VAX_32.  */
     case EM_VISIUM:
       return reloc_type == 3;  /* R_VISIUM_32. */
+    case EM_WEBASSEMBLY:
+      return reloc_type == 1;  /* R_WASM32_32.  */
     case EM_X86_64:
     case EM_L1OM:
     case EM_K1OM:
@@ -12396,6 +12404,7 @@ is_none_reloc (unsigned int reloc_type)
     case EM_TI_C6000:/* R_C6000_NONE.  */
     case EM_X86_64:  /* R_X86_64_NONE.  */
     case EM_XC16X:
+    case EM_WEBASSEMBLY: /* R_WASM32_NONE.  */
       return reloc_type == 0;
 
     case EM_AARCH64:
diff --git a/binutils/testsuite/binutils-all/nm.exp b/binutils/testsuite/binutils-all/nm.exp
index 13eafa6..fdcf194 100644
--- a/binutils/testsuite/binutils-all/nm.exp
+++ b/binutils/testsuite/binutils-all/nm.exp
@@ -175,7 +175,8 @@ if {   [is_elf_format]
     || [istarget *-*-tpf*]
     || [istarget *-*-uclinux*]
     || [istarget ia64-*-*vms*]
-    || [istarget *-*-vxworks*] } {
+    || [istarget *-*-vxworks*]
+    || [istarget wasm32-*-*] } {
     set nm_1_src "nm-elf-1.s"
 } else {
     set nm_1_src "nm-1.s"
diff --git a/binutils/testsuite/binutils-all/wasm32/create-wasm.d b/binutils/testsuite/binutils-all/wasm32/create-wasm.d
new file mode 100644
index 0000000..3a1c18a
--- /dev/null
+++ b/binutils/testsuite/binutils-all/wasm32/create-wasm.d
@@ -0,0 +1,10 @@
+#PROG: objcopy
+#source: create-wasm.s
+#as:
+#objcopy: -Ielf32-wasm32 -Owasm
+#objdump: -bbinary -s
+
+.*:.*file format binary
+
+Contents of section .data:
+ 0000 0061736d 01000000 01030100 00030100  .asm............
diff --git a/binutils/testsuite/binutils-all/wasm32/create-wasm.s b/binutils/testsuite/binutils-all/wasm32/create-wasm.s
new file mode 100644
index 0000000..5c360cc
--- /dev/null
+++ b/binutils/testsuite/binutils-all/wasm32/create-wasm.s
@@ -0,0 +1,6 @@
+        .section .wasm.function
+        .byte 0
+        .section .wasm.type
+        .byte 1
+        .byte 0
+        .byte 0
diff --git a/binutils/testsuite/binutils-all/wasm32/custom-section.d b/binutils/testsuite/binutils-all/wasm32/custom-section.d
new file mode 100644
index 0000000..3a39e77
--- /dev/null
+++ b/binutils/testsuite/binutils-all/wasm32/custom-section.d
@@ -0,0 +1,11 @@
+#PROG: objcopy
+#source: custom-section.s
+#as:
+#objcopy: -Ielf32-wasm32 -Owasm
+#objdump: -bbinary -s
+
+.*:.*file format binary
+
+Contents of section .data:
+ 0000 0061736d 01000000 0008046e 616d6502  .asm.......name.
+ 0010 0100                                 .. *$
diff --git a/binutils/testsuite/binutils-all/wasm32/custom-section.s b/binutils/testsuite/binutils-all/wasm32/custom-section.s
new file mode 100644
index 0000000..81fa671
--- /dev/null
+++ b/binutils/testsuite/binutils-all/wasm32/custom-section.s
@@ -0,0 +1,4 @@
+        .section .wasm.name
+        .byte 2
+        .byte 1
+        .byte 0
diff --git a/binutils/testsuite/binutils-all/wasm32/invalid-wasm-1.d b/binutils/testsuite/binutils-all/wasm32/invalid-wasm-1.d
new file mode 100644
index 0000000..e916fad
--- /dev/null
+++ b/binutils/testsuite/binutils-all/wasm32/invalid-wasm-1.d
@@ -0,0 +1,6 @@
+#PROG: objcopy
+#source: invalid-wasm-1.s
+#as:
+#objcopy: -Ielf32-wasm32 -Obinary
+#objdump: -bwasm -sD
+#error: : File format not recognized
\ No newline at end of file
diff --git a/binutils/testsuite/binutils-all/wasm32/invalid-wasm-1.s b/binutils/testsuite/binutils-all/wasm32/invalid-wasm-1.s
new file mode 100644
index 0000000..50d6690
--- /dev/null
+++ b/binutils/testsuite/binutils-all/wasm32/invalid-wasm-1.s
@@ -0,0 +1,7 @@
+        .data
+        .byte 0
+        .ascii "ASM"
+        .byte 1
+        .byte 0
+        .byte 0
+        .byte 0
diff --git a/binutils/testsuite/binutils-all/wasm32/invalid-wasm-2.d b/binutils/testsuite/binutils-all/wasm32/invalid-wasm-2.d
new file mode 100644
index 0000000..da28775
--- /dev/null
+++ b/binutils/testsuite/binutils-all/wasm32/invalid-wasm-2.d
@@ -0,0 +1,6 @@
+#PROG: objcopy
+#source: invalid-wasm-2.s
+#as:
+#objcopy: -Ielf32-wasm32 -Obinary
+#objdump: -bwasm -sD
+#exit: 1
\ No newline at end of file
diff --git a/binutils/testsuite/binutils-all/wasm32/invalid-wasm-2.s b/binutils/testsuite/binutils-all/wasm32/invalid-wasm-2.s
new file mode 100644
index 0000000..4270e9d
--- /dev/null
+++ b/binutils/testsuite/binutils-all/wasm32/invalid-wasm-2.s
@@ -0,0 +1,7 @@
+        .data
+        .byte 0
+        .ascii "asm"
+        .byte 2
+        .byte 0
+        .byte 0
+        .byte 0
diff --git a/binutils/testsuite/binutils-all/wasm32/long-sections.d b/binutils/testsuite/binutils-all/wasm32/long-sections.d
new file mode 100644
index 0000000..edf9058
--- /dev/null
+++ b/binutils/testsuite/binutils-all/wasm32/long-sections.d
@@ -0,0 +1,13 @@
+#PROG: objcopy
+#source: long-sections.s
+#as:
+#objcopy: -Ielf32-wasm32 -Owasm
+#objdump: -bbinary -s
+
+.*:.*file format binary
+
+Contents of section .data:
+ 00000 0061736d 01000000 01800200 00000000  .asm............
+#...
+ 00100 00000000 00000000 0000000a 80800400  ................
+#pass
diff --git a/binutils/testsuite/binutils-all/wasm32/long-sections.s b/binutils/testsuite/binutils-all/wasm32/long-sections.s
new file mode 100644
index 0000000..a8642d2
--- /dev/null
+++ b/binutils/testsuite/binutils-all/wasm32/long-sections.s
@@ -0,0 +1,9 @@
+        .section .wasm.type
+        .rept 256
+        .byte 0
+        .endr
+
+        .section .wasm.code
+        .rept 65536
+        .byte 0
+        .endr
diff --git a/binutils/testsuite/binutils-all/wasm32/parse-wasm-2.d b/binutils/testsuite/binutils-all/wasm32/parse-wasm-2.d
new file mode 100644
index 0000000..8b59c74
--- /dev/null
+++ b/binutils/testsuite/binutils-all/wasm32/parse-wasm-2.d
@@ -0,0 +1,15 @@
+#PROG: objcopy
+#source: parse-wasm-2.s
+#as:
+#objcopy: -Ielf32-wasm32 -Obinary
+#objdump: -bwasm -s
+
+.*:.*file format wasm
+
+Contents of section .wasm.type:
+ 80000000 01600001 7f                          .`...           
+Contents of section .wasm.function:
+ 80000005 0100                                 ..              
+Contents of section .wasm.code:
+ 80000007 01858080 80000041 2a0f0b             .......A\*..     
+#pass
diff --git a/binutils/testsuite/binutils-all/wasm32/parse-wasm-2.s b/binutils/testsuite/binutils-all/wasm32/parse-wasm-2.s
new file mode 100644
index 0000000..bc918b7
--- /dev/null
+++ b/binutils/testsuite/binutils-all/wasm32/parse-wasm-2.s
@@ -0,0 +1,43 @@
+        .data
+        .byte 0
+        .ascii "asm"
+        .byte 1
+        .byte 0
+        .byte 0
+        .byte 0
+        .byte 1
+        .byte 0x85
+        .byte 0x80
+        .byte 0x80
+        .byte 0x80
+        .byte 0
+        .byte 1
+        .byte 0x60
+        .byte 0
+        .byte 1
+        .byte 0x7f
+        .byte 3
+        .byte 0x82
+        .byte 0x80
+        .byte 0x80
+        .byte 0x80
+        .byte 0
+        .byte 1
+        .byte 0
+        .byte 0x0a
+        .byte 0x8b
+        .byte 0x80
+        .byte 0x80
+        .byte 0x80
+        .byte 0
+        .byte 1
+        .byte 0x85
+        .byte 0x80
+        .byte 0x80
+        .byte 0x80
+        .byte 0
+        .byte 0
+        .byte 0x41
+        .byte 0x2a
+        .byte 0x0f
+        .byte 0x0b
diff --git a/binutils/testsuite/binutils-all/wasm32/parse-wasm.d b/binutils/testsuite/binutils-all/wasm32/parse-wasm.d
new file mode 100644
index 0000000..fd8bc70
--- /dev/null
+++ b/binutils/testsuite/binutils-all/wasm32/parse-wasm.d
@@ -0,0 +1,8 @@
+#PROG: objcopy
+#source: parse-wasm.s
+#as:
+#objcopy: -Ielf32-wasm32 -Obinary
+#objdump: -bwasm -s
+
+.*:.*file format wasm
+
diff --git a/binutils/testsuite/binutils-all/wasm32/parse-wasm.s b/binutils/testsuite/binutils-all/wasm32/parse-wasm.s
new file mode 100644
index 0000000..d495ea1
--- /dev/null
+++ b/binutils/testsuite/binutils-all/wasm32/parse-wasm.s
@@ -0,0 +1,7 @@
+        .data
+        .byte 0
+        .ascii "asm"
+        .byte 1
+        .byte 0
+        .byte 0
+        .byte 0
diff --git a/binutils/testsuite/binutils-all/wasm32/prepared-section.d b/binutils/testsuite/binutils-all/wasm32/prepared-section.d
new file mode 100644
index 0000000..c5bfafa
--- /dev/null
+++ b/binutils/testsuite/binutils-all/wasm32/prepared-section.d
@@ -0,0 +1,10 @@
+#PROG: objcopy
+#source: prepared-section.s
+#as:
+#objcopy: -Ielf32-wasm32 -Owasm
+#objdump: -bbinary -s
+
+.*:.*file format binary
+
+Contents of section .data:
+ 0000 0061736d 01000000 0006046e 616d6500  .asm.......name.
diff --git a/binutils/testsuite/binutils-all/wasm32/prepared-section.s b/binutils/testsuite/binutils-all/wasm32/prepared-section.s
new file mode 100644
index 0000000..574f6e0
--- /dev/null
+++ b/binutils/testsuite/binutils-all/wasm32/prepared-section.s
@@ -0,0 +1,6 @@
+        .section .prepared
+        .byte 0
+        .byte 0x6
+        .byte 4
+        .ascii "name"
+        .byte 0
diff --git a/binutils/testsuite/binutils-all/wasm32/wasm32.exp b/binutils/testsuite/binutils-all/wasm32/wasm32.exp
new file mode 100644
index 0000000..b95569a
--- /dev/null
+++ b/binutils/testsuite/binutils-all/wasm32/wasm32.exp
@@ -0,0 +1,30 @@
+#   Copyright (C) 2010-2017 Free Software Foundation, Inc.
+#   Copyright (C) 2017 Pip Cet <pipcet@gmail.com>
+
+# 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.
+
+if { ![istarget "wasm32-*-*"] } then {
+    return
+}
+
+run_dump_test "create-wasm"
+run_dump_test "custom-section"
+run_dump_test "long-sections"
+run_dump_test "parse-wasm"
+run_dump_test "parse-wasm-2"
+run_dump_test "prepared-section"
+
+#run_dump_test "invalid-wasm-1"
+#run_dump_test "invalid-wasm-2"
diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp
index 327db46..70b6773 100644
--- a/binutils/testsuite/lib/binutils-common.exp
+++ b/binutils/testsuite/lib/binutils-common.exp
@@ -41,6 +41,7 @@ proc is_elf_format {} {
 	 && ![istarget *-*-solaris2*]
 	 && ![istarget *-*-sysv4*]
 	 && ![istarget *-*-unixware*]
+	 && ![istarget *-*-wasm32*]
 	 && ![istarget avr-*-*]
 	 && ![istarget bfin-*-uclinux]
 	 && ![istarget frv-*-uclinux*]
@@ -183,6 +184,9 @@ proc supports_gnu_unique {} {
     if { [istarget "arm*-*-*eabi*"] } {
 	return 1
     }
+    if { [istarget "wasm32*-*-*"] } {
+        return 1
+    }
     if { ![istarget "*-*-elf*"] } {
 	return 0
     }
diff --git a/gas/ChangeLog b/gas/ChangeLog
index f24e821..a5c1d08 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,73 @@
+2017-03-30  Pip Cet  <pipcet@gmail.com>
+
+	* config/tc-wasm32.h: New file: Add WebAssembly assembler target.
+	* config/tc-wasm32.c: New file: Add WebAssembly assembler target.
+	* Makefile.am: Add WebAssembly assembler target.
+	* configure.tgt: Add WebAssembly assembler target.
+	* doc/c-wasm32.texi: New file: Start documenting WebAssembly
+	assembler.
+	* doc/all.texi: Define WASM32.
+	* doc/as.texinfo: Add WebAssembly entries.
+	* NEWS: Mention the new support.
+	* Makefile.in: Regenerate.
+	* po/gas.pot: Regenerate.
+	* po/POTFILES.in: Regenerate.
+	* testsuite/gas/wasm32: New directory.
+	* testsuite/gas/wasm32/allinsn.d: New file.
+	* testsuite/gas/wasm32/allinsn.s: New file.
+	* testsuite/gas/wasm32/illegal.l: New file.
+	* testsuite/gas/wasm32/illegal.s: New file.
+	* testsuite/gas/wasm32/illegal-2.l: New file.
+	* testsuite/gas/wasm32/illegal-2.s: New file.
+	* testsuite/gas/wasm32/illegal-3.l: New file.
+	* testsuite/gas/wasm32/illegal-3.s: New file.
+	* testsuite/gas/wasm32/illegal-4.l: New file.
+	* testsuite/gas/wasm32/illegal-4.s: New file.
+	* testsuite/gas/wasm32/illegal-5.l: New file.
+	* testsuite/gas/wasm32/illegal-5.s: New file.
+	* testsuite/gas/wasm32/illegal-6.l: New file.
+	* testsuite/gas/wasm32/illegal-6.s: New file.
+	* testsuite/gas/wasm32/illegal-7.l: New file.
+	* testsuite/gas/wasm32/illegal-7.s: New file.
+	* testsuite/gas/wasm32/illegal-8.l: New file.
+	* testsuite/gas/wasm32/illegal-8.s: New file.
+	* testsuite/gas/wasm32/illegal-9.l: New file.
+	* testsuite/gas/wasm32/illegal-9.s: New file.
+	* testsuite/gas/wasm32/illegal-10.l: New file.
+	* testsuite/gas/wasm32/illegal-10.s: New file.
+	* testsuite/gas/wasm32/illegal-11.l: New file.
+	* testsuite/gas/wasm32/illegal-11.s: New file.
+	* testsuite/gas/wasm32/illegal-12.l: New file.
+	* testsuite/gas/wasm32/illegal-12.s: New file.
+	* testsuite/gas/wasm32/illegal-13.l: New file.
+	* testsuite/gas/wasm32/illegal-13.s: New file.
+	* testsuite/gas/wasm32/illegal-14.l: New file.
+	* testsuite/gas/wasm32/illegal-14.s: New file.
+	* testsuite/gas/wasm32/illegal-15.l: New file.
+	* testsuite/gas/wasm32/illegal-15.s: New file.
+	* testsuite/gas/wasm32/illegal-16.l: New file.
+	* testsuite/gas/wasm32/illegal-16.s: New file.
+	* testsuite/gas/wasm32/illegal-17.l: New file.
+	* testsuite/gas/wasm32/illegal-17.s: New file.
+	* testsuite/gas/wasm32/illegal-18.l: New file.
+	* testsuite/gas/wasm32/illegal-18.s: New file.
+	* testsuite/gas/wasm32/illegal-19.l: New file.
+	* testsuite/gas/wasm32/illegal-19.s: New file.
+	* testsuite/gas/wasm32/illegal-20.l: New file.
+	* testsuite/gas/wasm32/illegal-20.s: New file.
+	* testsuite/gas/wasm32/illegal-21.l: New file.
+	* testsuite/gas/wasm32/illegal-21.s: New file.
+	* testsuite/gas/wasm32/illegal-22.l: New file.
+	* testsuite/gas/wasm32/illegal-22.s: New file.
+	* testsuite/gas/wasm32/illegal-24.l: New file.
+	* testsuite/gas/wasm32/illegal-24.s: New file.
+	* testsuite/gas/wasm32/illegal-25.l: New file.
+	* testsuite/gas/wasm32/illegal-25.s: New file.
+	* testsuite/gas/wasm32/reloc.d: New file.
+	* testsuite/gas/wasm32/reloc.s: New file.
+	* testsuite/gas/wasm32/wasm32.exp: New tests for WebAssembly
+	architecture.
+
 2017-03-29  Alan Modra  <amodra@gmail.com>
 
 	* config/tc-ppc.c (md_parse_option): Reject -mraw.
diff --git a/gas/Makefile.am b/gas/Makefile.am
index 851532c..c9f9de0 100644
--- a/gas/Makefile.am
+++ b/gas/Makefile.am
@@ -196,6 +196,7 @@ TARGET_CPU_CFILES = \
 	config/tc-v850.c \
 	config/tc-vax.c \
 	config/tc-visium.c \
+	config/tc-wasm32.c \
 	config/tc-xstormy16.c \
 	config/tc-xc16x.c \
 	config/tc-xgate.c \
@@ -271,6 +272,7 @@ TARGET_CPU_HFILES = \
 	config/tc-v850.h \
 	config/tc-vax.h \
 	config/tc-visium.h \
+	config/tc-wasm32.h \
 	config/tc-xstormy16.h \
 	config/tc-xc16x.h \
 	config/tc-xgate.h \
diff --git a/gas/Makefile.in b/gas/Makefile.in
index f995c02..1927de5 100644
--- a/gas/Makefile.in
+++ b/gas/Makefile.in
@@ -492,6 +492,7 @@ TARGET_CPU_CFILES = \
 	config/tc-v850.c \
 	config/tc-vax.c \
 	config/tc-visium.c \
+	config/tc-wasm32.c \
 	config/tc-xstormy16.c \
 	config/tc-xc16x.c \
 	config/tc-xgate.c \
@@ -567,6 +568,7 @@ TARGET_CPU_HFILES = \
 	config/tc-v850.h \
 	config/tc-vax.h \
 	config/tc-visium.h \
+	config/tc-wasm32.h \
 	config/tc-xstormy16.h \
 	config/tc-xc16x.h \
 	config/tc-xgate.h \
@@ -927,6 +929,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-v850.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-vax.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-visium.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-wasm32.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-xc16x.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-xgate.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-xstormy16.Po@am__quote@
@@ -1896,6 +1899,20 @@ tc-visium.obj: config/tc-visium.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tc-visium.obj `if test -f 'config/tc-visium.c'; then $(CYGPATH_W) 'config/tc-visium.c'; else $(CYGPATH_W) '$(srcdir)/config/tc-visium.c'; fi`
 
+tc-wasm32.o: config/tc-wasm32.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tc-wasm32.o -MD -MP -MF $(DEPDIR)/tc-wasm32.Tpo -c -o tc-wasm32.o `test -f 'config/tc-wasm32.c' || echo '$(srcdir)/'`config/tc-wasm32.c
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/tc-wasm32.Tpo $(DEPDIR)/tc-wasm32.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='config/tc-wasm32.c' object='tc-wasm32.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tc-wasm32.o `test -f 'config/tc-wasm32.c' || echo '$(srcdir)/'`config/tc-wasm32.c
+
+tc-wasm32.obj: config/tc-wasm32.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tc-wasm32.obj -MD -MP -MF $(DEPDIR)/tc-wasm32.Tpo -c -o tc-wasm32.obj `if test -f 'config/tc-wasm32.c'; then $(CYGPATH_W) 'config/tc-wasm32.c'; else $(CYGPATH_W) '$(srcdir)/config/tc-wasm32.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/tc-wasm32.Tpo $(DEPDIR)/tc-wasm32.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='config/tc-wasm32.c' object='tc-wasm32.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tc-wasm32.obj `if test -f 'config/tc-wasm32.c'; then $(CYGPATH_W) 'config/tc-wasm32.c'; else $(CYGPATH_W) '$(srcdir)/config/tc-wasm32.c'; fi`
+
 tc-xstormy16.o: config/tc-xstormy16.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tc-xstormy16.o -MD -MP -MF $(DEPDIR)/tc-xstormy16.Tpo -c -o tc-xstormy16.o `test -f 'config/tc-xstormy16.c' || echo '$(srcdir)/'`config/tc-xstormy16.c
 @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/tc-xstormy16.Tpo $(DEPDIR)/tc-xstormy16.Po
diff --git a/gas/NEWS b/gas/NEWS
index aee3852..46eaff3 100644
--- a/gas/NEWS
+++ b/gas/NEWS
@@ -1,5 +1,7 @@
 -*- text -*-
 
+* Add support for the WebAssembly file format and wasm32 ELF conversion.
+
 * PowerPC gas now checks that the correct register class is used in
   instructions.  For instance, "addi %f4,%cr3,%r31" warns three times
   that the registers are invalid.
diff --git a/gas/config/tc-wasm32.c b/gas/config/tc-wasm32.c
new file mode 100644
index 0000000..0b05ef1
--- /dev/null
+++ b/gas/config/tc-wasm32.c
@@ -0,0 +1,821 @@
+/* tc-wasm32.c -- Assembler code for the wasm32 target.
+
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This file is part of GAS, the GNU Assembler.
+
+   GAS 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, or (at your option)
+   any later version.
+
+   GAS 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 GAS; see the file COPYING.  If not, write to the Free
+   Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+   02110-1301, USA.  */
+
+#include "as.h"
+#include "safe-ctype.h"
+#include "subsegs.h"
+#include "dwarf2dbg.h"
+#include "dw2gencfi.h"
+#include "elf/wasm32.h"
+#include <float.h>
+
+enum wasm_class
+{
+  wasm_typed,			/* a typed opcode: block, loop, or if */
+  wasm_special,			/* a special opcode: unreachable, nop, else,
+				   or end */
+  wasm_break,			/* "br" */
+  wasm_break_if,		/* "br_if" opcode */
+  wasm_break_table,		/* "br_table" opcode */
+  wasm_return,			/* "return" opcode */
+  wasm_call,			/* "call" opcode */
+  wasm_call_indirect,		/* "call_indirect" opcode */
+  wasm_get_local,		/* "get_local" and "get_global" */
+  wasm_set_local,		/* "set_local" and "set_global" */
+  wasm_tee_local,		/* "tee_local" */
+  wasm_drop,			/* "drop" */
+  wasm_constant_i32,		/* "i32.const" */
+  wasm_constant_i64,		/* "i64.const" */
+  wasm_constant_f32,		/* "f32.const" */
+  wasm_constant_f64,		/* "f64.const" */
+  wasm_unary,			/* unary operators */
+  wasm_binary,			/* binary operators */
+  wasm_conv,			/* conversion operators */
+  wasm_load,			/* load operators */
+  wasm_store,			/* store operators */
+  wasm_select,			/* "select" */
+  wasm_relational,		/* comparison operators, except for "eqz" */
+  wasm_eqz,			/* "eqz" */
+  wasm_current_memory,		/* "current_memory" */
+  wasm_grow_memory,		/* "grow_memory" */
+  wasm_signature		/* "signature", which isn't an opcode */
+};
+
+#define WASM_OPCODE(opcode, name, intype, outtype, class, signedness)   \
+  { name, wasm_ ## class, opcode },
+
+struct wasm32_opcode_s
+{
+  const char *name;
+  enum wasm_class clas;
+  unsigned char opcode;
+} wasm32_opcodes[] =
+{
+#include "opcode/wasm.h"
+  {
+  NULL, 0, 0}
+};
+
+const char comment_chars[] = ";#";
+const char line_comment_chars[] = ";#";
+const char line_separator_chars[] = "";
+
+const char *md_shortopts = "m:";
+
+const char EXP_CHARS[] = "eE";
+const char FLT_CHARS[] = "dD";
+
+/* The target specific pseudo-ops which we support.  */
+
+const pseudo_typeS md_pseudo_table[] =
+{
+  {NULL, NULL, 0}
+};
+
+/* Opcode hash table.  */
+
+static struct hash_control *wasm32_hash;
+
+struct option md_longopts[] =
+{
+  {NULL, no_argument, NULL, 0}
+};
+
+size_t md_longopts_size = sizeof (md_longopts);
+
+/* No relaxation/no machine-dependent frags.  */
+
+int
+md_estimate_size_before_relax (fragS * fragp ATTRIBUTE_UNUSED,
+			       asection * seg ATTRIBUTE_UNUSED)
+{
+  abort ();
+  return 0;
+}
+
+void
+md_show_usage (FILE * stream)
+{
+  fprintf (stream, _("wasm32 assembler options:\n"));
+}
+
+/* No machine-dependent options.  */
+
+int
+md_parse_option (int c ATTRIBUTE_UNUSED, const char *arg ATTRIBUTE_UNUSED)
+{
+  return 0;
+}
+
+/* No machine-dependent symbols.  */
+
+symbolS *
+md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
+{
+  return NULL;
+}
+
+/* IEEE little-endian floats.  */
+
+const char *
+md_atof (int type, char *litP, int *sizeP)
+{
+  return ieee_md_atof (type, litP, sizeP, FALSE);
+}
+
+/* No machine-dependent frags.  */
+
+void
+md_convert_frag (bfd * abfd ATTRIBUTE_UNUSED,
+		 asection * sec ATTRIBUTE_UNUSED,
+		 fragS * fragP ATTRIBUTE_UNUSED)
+{
+  abort ();
+}
+
+/* Build opcode hash table, set some flags.  */
+
+void
+md_begin (void)
+{
+  struct wasm32_opcode_s *opcode;
+
+  wasm32_hash = hash_new ();
+
+  /* Insert unique names into hash table.  This hash table then
+     provides a quick index to the first opcode with a particular name
+     in the opcode table.  */
+  for (opcode = wasm32_opcodes; opcode->name; opcode++)
+    hash_insert (wasm32_hash, opcode->name, (char *) opcode);
+
+  linkrelax = 0;
+  flag_sectname_subst = 1;
+  flag_no_comments = 0;
+  flag_keep_locals = 1;
+}
+
+/* Do the normal thing for md_section_align.  */
+
+valueT
+md_section_align (asection * seg, valueT addr)
+{
+  int align = bfd_get_section_alignment (stdoutput, seg);
+  return ((addr + (1 << align) - 1) & -(1 << align));
+}
+
+/* Apply a fixup, return TRUE if done (and no relocation is
+   needed).  */
+
+static bfd_boolean
+apply_full_field_fix (fixS * fixP, char *buf, bfd_vma val, int size)
+{
+  if (fixP->fx_addsy != NULL || fixP->fx_pcrel)
+    {
+      fixP->fx_addnumber = val;
+      return FALSE;
+    }
+
+  number_to_chars_littleendian (buf, val, size);
+  return TRUE;
+}
+
+/* Apply a fixup (potentially PC-relative), set the fx_done flag if
+   done.  */
+
+void
+md_apply_fix (fixS * fixP, valueT * valP, segT seg ATTRIBUTE_UNUSED)
+{
+  char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
+  long val = (long) *valP;
+
+  if (fixP->fx_pcrel)
+    {
+      switch (fixP->fx_r_type)
+	{
+	default:
+	  bfd_set_error (bfd_error_bad_value);
+	  return;
+
+	case BFD_RELOC_32:
+	  fixP->fx_r_type = BFD_RELOC_32_PCREL;
+	  return;
+	}
+    }
+
+  if (apply_full_field_fix (fixP, buf, val, fixP->fx_size))
+    fixP->fx_done = 1;
+}
+
+/* Skip whitespace.  */
+
+static inline char *
+skip_space (char *s)
+{
+  while (*s == ' ' || *s == '\t')
+    ++s;
+  return s;
+}
+
+/* Allow '/' in opcodes.  */
+
+static inline bfd_boolean
+is_part_of_opcode (char c)
+{
+  return is_part_of_name (c) || (c == '/');
+}
+
+/* Extract an opcode.  */
+
+static char *
+extract_opcode (char *from, char *to, int limit)
+{
+  char *op_end;
+  int size = 0;
+
+  /* Drop leading whitespace.  */
+  from = skip_space (from);
+  *to = 0;
+
+  /* Find the op code end.  */
+  for (op_end = from; *op_end != 0 && is_part_of_opcode (*op_end);)
+    {
+      to[size++] = *op_end++;
+      if (size + 1 >= limit)
+	break;
+    }
+
+  to[size] = 0;
+  return op_end;
+}
+
+/* Produce an unsigned LEB128 integer padded to the right number of
+   bytes to store BITS bits, of value VALUE.  Uses FRAG_APPEND_1_CHAR
+   to write.  */
+
+static void
+wasm32_put_long_uleb128 (int bits, unsigned long value)
+{
+  unsigned char c;
+  int i = 0;
+
+  do
+    {
+      c = value & 0x7f;
+      value >>= 7;
+      if (i < (bits - 1) / 7)
+	c |= 0x80;
+      FRAG_APPEND_1_CHAR (c);
+    }
+  while (++i < (bits + 6) / 7);
+}
+
+/* Produce a signed LEB128 integer, using FRAG_APPEND_1_CHAR to
+   write.  */
+
+static void
+wasm32_put_sleb128 (long value)
+{
+  unsigned char c;
+  int more;
+
+  do
+    {
+      c = (value & 0x7f);
+      value >>= 7;
+      more = !((((value == 0) && ((c & 0x40) == 0))
+		|| ((value == -1) && ((c & 0x40) != 0))));
+      if (more)
+	c |= 0x80;
+      FRAG_APPEND_1_CHAR (c);
+    }
+  while (more);
+}
+
+/* Produce an unsigned LEB128 integer, using FRAG_APPEND_1_CHAR to
+   write.  */
+
+static void
+wasm32_put_uleb128 (unsigned long value)
+{
+  unsigned char c;
+
+  do
+    {
+      c = value & 0x7f;
+      value >>= 7;
+      if (value)
+	c |= 0x80;
+      FRAG_APPEND_1_CHAR (c);
+    }
+  while (value);
+}
+
+/* Read an integer expression.  Produce an LEB128-encoded integer if
+   it's a constant, a padded LEB128 plus a relocation if it's a
+   symbol, or a special relocation for <expr>@got, <expr>@gotcode, and
+   <expr>@plt{__sigchar_<signature>}.  */
+
+static bfd_boolean
+wasm32_leb128 (char **line, int bits, int sign)
+{
+  char *t = input_line_pointer;
+  char *str = *line;
+  char *str0 = str;
+  struct reloc_list *reloc;
+  expressionS ex;
+  int gotrel = 0;
+  int pltrel = 0;
+  int code = 0;
+  const char *relname;
+
+  input_line_pointer = str;
+  expression (&ex);
+
+  if (ex.X_op == O_constant && *input_line_pointer != '@')
+    {
+      long value = ex.X_add_number;
+
+      str = input_line_pointer;
+      str = skip_space (str);
+      *line = str;
+      if (sign)
+	wasm32_put_sleb128 (value);
+      else
+	{
+	  if (value < 0)
+	    as_bad (_("unexpected negative constant"));
+	  wasm32_put_uleb128 (value);
+	}
+      input_line_pointer = t;
+      return str != str0;
+    }
+
+  reloc = XNEW (struct reloc_list);
+  reloc->u.a.offset_sym = expr_build_dot ();
+  if (ex.X_op == O_symbol)
+    {
+      reloc->u.a.sym = ex.X_add_symbol;
+      reloc->u.a.addend = ex.X_add_number;
+    }
+  else
+    {
+      reloc->u.a.sym = make_expr_symbol (&ex);
+      reloc->u.a.addend = 0;
+    }
+  /* i32.const fpointer@gotcode */
+  if (strncmp (input_line_pointer, "@gotcode", 8) == 0)
+    {
+      gotrel = 1;
+      code = 1;
+      input_line_pointer += 8;
+    }
+  /* i32.const data@got */
+  else if (strncmp (input_line_pointer, "@got", 4) == 0)
+    {
+      gotrel = 1;
+      input_line_pointer += 4;
+    }
+  /* call f@plt{__sigchar_FiiiiE} */
+  else if (strncmp (input_line_pointer, "@plt", 4) == 0)
+    {
+      char *end_of_sig;
+
+      pltrel = 1;
+      code = 1;
+      input_line_pointer += 4;
+
+      if (strncmp (input_line_pointer, "{", 1) == 0
+          && (end_of_sig = strchr (input_line_pointer, '}')))
+	{
+	  char *signature;
+	  struct reloc_list *reloc2;
+	  size_t siglength = end_of_sig - (input_line_pointer + 1);
+
+	  signature = strndup (input_line_pointer + 1, siglength);
+
+	  reloc2 = XNEW (struct reloc_list);
+	  reloc2->u.a.offset_sym = expr_build_dot ();
+	  reloc2->u.a.sym = symbol_find_or_make (signature);
+	  reloc2->u.a.addend = 0;
+	  reloc2->u.a.howto = bfd_reloc_name_lookup
+	    (stdoutput, "R_WASM32_PLT_SIG");
+	  reloc2->next = reloc_list;
+	  reloc_list = reloc2;
+	  input_line_pointer = end_of_sig + 1;
+	}
+      else
+	{
+	  as_bad (_("no function type on PLT reloc"));
+	}
+    }
+
+  if (gotrel && code)
+    relname = "R_WASM32_LEB128_GOT_CODE";
+  else if (gotrel)
+    relname = "R_WASM32_LEB128_GOT";
+  else if (pltrel)
+    relname = "R_WASM32_LEB128_PLT";
+  else
+    relname = "R_WASM32_LEB128";
+
+  reloc->u.a.howto = bfd_reloc_name_lookup (stdoutput, relname);
+  if (!reloc->u.a.howto)
+    as_bad (_("couldn't find relocation to use"));
+  reloc->file = as_where (&reloc->line);
+  reloc->next = reloc_list;
+  reloc_list = reloc;
+
+  str = input_line_pointer;
+  str = skip_space (str);
+  *line = str;
+  wasm32_put_long_uleb128 (bits, 0);
+  input_line_pointer = t;
+
+  return str != str0;
+}
+
+/* Read an integer expression and produce an unsigned LEB128 integer,
+   or a relocation for it.  */
+
+static bfd_boolean
+wasm32_uleb128 (char **line, int bits)
+{
+  return wasm32_leb128 (line, bits, 0);
+}
+
+/* Read an integer expression and produce a signed LEB128 integer, or
+   a relocation for it.  */
+
+static bfd_boolean
+wasm32_sleb128 (char **line, int bits)
+{
+  return wasm32_leb128 (line, bits, 1);
+}
+
+/* Read an f32.  (Like float_cons ('f')).  */
+
+static void
+wasm32_f32 (char **line)
+{
+  char *t = input_line_pointer;
+
+  input_line_pointer = *line;
+  float_cons ('f');
+  *line = input_line_pointer;
+  input_line_pointer = t;
+}
+
+/* Read an f64.  (Like float_cons ('d')).  */
+
+static void
+wasm32_f64 (char **line)
+{
+  char *t = input_line_pointer;
+
+  input_line_pointer = *line;
+  float_cons ('d');
+  *line = input_line_pointer;
+  input_line_pointer = t;
+}
+
+/* Assemble a signature from LINE, replacing it with the new input
+   pointer.  Signatures are simple expressions matching the regexp
+   F[ilfd]*v?E, and interpreted as though they were C++-mangled
+   function types on a 64-bit machine. */
+
+static void
+wasm32_signature (char **line)
+{
+  unsigned long count = 0;
+  char *str = *line;
+  char *ostr;
+  char *result;
+
+  if (*str++ != 'F')
+    as_bad (_("Not a function type"));
+  result = str;
+  ostr = str + 1;
+  str++;
+
+  while (*str != 'E')
+    {
+      switch (*str++)
+	{
+	case 'i':
+	case 'l':
+	case 'f':
+	case 'd':
+	  count++;
+	  break;
+	default:
+	  as_bad (_("Unknown type %c\n"), str[-1]);
+	}
+    }
+  wasm32_put_uleb128 (count);
+  str = ostr;
+  while (*str != 'E')
+    {
+      switch (*str++)
+	{
+	case 'i':
+	  FRAG_APPEND_1_CHAR (BLOCK_TYPE_I32);
+	  break;
+	case 'l':
+	  FRAG_APPEND_1_CHAR (BLOCK_TYPE_I64);
+	  break;
+	case 'f':
+	  FRAG_APPEND_1_CHAR (BLOCK_TYPE_F32);
+	  break;
+	case 'd':
+	  FRAG_APPEND_1_CHAR (BLOCK_TYPE_F64);
+	  break;
+	default:
+	  as_bad (_("Unknown type"));
+	}
+    }
+  str++;
+  switch (*result)
+    {
+    case 'v':
+      FRAG_APPEND_1_CHAR (0x00);	/* no return value */
+      break;
+    case 'i':
+      FRAG_APPEND_1_CHAR (0x01);	/* one return value */
+      FRAG_APPEND_1_CHAR (BLOCK_TYPE_I32);
+      break;
+    case 'l':
+      FRAG_APPEND_1_CHAR (0x01);	/* one return value */
+      FRAG_APPEND_1_CHAR (BLOCK_TYPE_I64);
+      break;
+    case 'f':
+      FRAG_APPEND_1_CHAR (0x01);	/* one return value */
+      FRAG_APPEND_1_CHAR (BLOCK_TYPE_F32);
+      break;
+    case 'd':
+      FRAG_APPEND_1_CHAR (0x01);	/* one return value */
+      FRAG_APPEND_1_CHAR (BLOCK_TYPE_F64);
+      break;
+    default:
+      as_bad (_("Unknown type"));
+    }
+  *line = str;
+}
+
+/* Main operands function.  Read the operands for OPCODE from LINE,
+   replacing it with the new input pointer.  */
+
+static void
+wasm32_operands (struct wasm32_opcode_s *opcode, char **line)
+{
+  char *str = *line;
+  unsigned long block_type = 0;
+
+  FRAG_APPEND_1_CHAR (opcode->opcode);
+  str = skip_space (str);
+  if (str[0] == '[')
+    {
+      if (opcode->clas == wasm_typed)
+	{
+	  str++;
+	  block_type = BLOCK_TYPE_NONE;
+	  if (str[0] != ']')
+	    {
+	      str = skip_space (str);
+	      switch (str[0])
+		{
+		case 'i':
+		  block_type = BLOCK_TYPE_I32;
+		  str++;
+		  break;
+		case 'l':
+		  block_type = BLOCK_TYPE_I64;
+		  str++;
+		  break;
+		case 'f':
+		  block_type = BLOCK_TYPE_F32;
+		  str++;
+		  break;
+		case 'd':
+		  block_type = BLOCK_TYPE_F64;
+		  str++;
+		  break;
+		}
+	      str = skip_space (str);
+	      if (str[0] == ']')
+		str++;
+	      else
+		as_bad (_("only single block types allowed"));
+	      str = skip_space (str);
+	    }
+	  else
+	    {
+	      str++;
+	      str = skip_space (str);
+	    }
+	}
+      else
+	as_bad (_("instruction does not take a block type"));
+    }
+
+  switch (opcode->clas)
+    {
+    case wasm_drop:
+    case wasm_special:
+    case wasm_binary:
+    case wasm_unary:
+    case wasm_relational:
+    case wasm_select:
+    case wasm_eqz:
+    case wasm_conv:
+    case wasm_return:
+      break;
+    case wasm_typed:
+      if (block_type == 0)
+	as_bad (_("missing block type"));
+      FRAG_APPEND_1_CHAR (block_type);
+      break;
+    case wasm_store:
+    case wasm_load:
+      if (str[0] == 'a' && str[1] == '=')
+	{
+	  str += 2;
+	  if (!wasm32_uleb128 (&str, 32))
+	    as_bad (_("missing alignment hint"));
+	}
+      else
+	{
+	  as_bad (_("missing alignment hint"));
+	}
+      str = skip_space (str);
+      if (!wasm32_uleb128 (&str, 32))
+	as_bad (_("missing offset"));
+      break;
+    case wasm_set_local:
+    case wasm_get_local:
+    case wasm_tee_local:
+      if (!wasm32_uleb128 (&str, 32))
+	as_bad (_("missing local index"));
+      break;
+    case wasm_break:
+    case wasm_break_if:
+      if (!wasm32_uleb128 (&str, 32))
+	as_bad (_("missing break count"));
+      break;
+    case wasm_current_memory:
+    case wasm_grow_memory:
+      if (!wasm32_uleb128 (&str, 32))
+	as_bad (_("missing reserved current_memory/grow_memory argument"));
+      break;
+    case wasm_call:
+      if (!wasm32_uleb128 (&str, 32))
+	as_bad (_("missing call argument"));
+      break;
+    case wasm_call_indirect:
+      if (!wasm32_uleb128 (&str, 32))
+	as_bad (_("missing call signature"));
+      if (!wasm32_uleb128 (&str, 32))
+	as_bad (_("missing table index"));
+      break;
+    case wasm_constant_i32:
+      wasm32_sleb128 (&str, 32);
+      break;
+    case wasm_constant_i64:
+      wasm32_sleb128 (&str, 64);
+      break;
+    case wasm_constant_f32:
+      wasm32_f32 (&str);
+      return;
+    case wasm_constant_f64:
+      wasm32_f64 (&str);
+      return;
+    case wasm_break_table:
+      {
+	do
+	  {
+	    wasm32_uleb128 (&str, 32);
+	    str = skip_space (str);
+	  }
+	while (str[0]);
+
+	break;
+      }
+    case wasm_signature:
+      wasm32_signature (&str);
+    }
+  str = skip_space (str);
+
+  if (*str)
+    as_bad (_("junk at end of line, first unrecognized character is `%c'"),
+	    *str);
+
+  *line = str;
+
+  return;
+}
+
+/* Main assembly function.  Find the opcode and call
+   wasm32_operands().  */
+
+void
+md_assemble (char *str)
+{
+  char op[32];
+  char *t;
+  struct wasm32_opcode_s *opcode;
+
+  str = skip_space (extract_opcode (str, op, sizeof (op)));
+
+  if (!op[0])
+    as_bad (_("can't find opcode "));
+
+  opcode = (struct wasm32_opcode_s *) hash_find (wasm32_hash, op);
+
+  if (opcode == NULL)
+    {
+      as_bad (_("unknown opcode `%s'"), op);
+      return;
+    }
+
+  dwarf2_emit_insn (0);
+
+  t = input_line_pointer;
+  wasm32_operands (opcode, &str);
+  input_line_pointer = t;
+}
+
+/* Don't replace PLT/GOT relocations with section symbols, so they
+   don't get an addend.  */
+
+int
+wasm32_force_relocation (fixS * f)
+{
+  if (f->fx_r_type == BFD_RELOC_WASM32_LEB128_PLT
+      || f->fx_r_type == BFD_RELOC_WASM32_LEB128_GOT)
+    return 1;
+
+  return 0;
+}
+
+/* Don't replace PLT/GOT relocations with section symbols, so they
+   don't get an addend.  */
+
+bfd_boolean
+wasm32_fix_adjustable (fixS * fixP)
+{
+  if (fixP->fx_addsy == NULL)
+    return TRUE;
+
+  if (fixP->fx_r_type == BFD_RELOC_WASM32_LEB128_PLT
+      || fixP->fx_r_type == BFD_RELOC_WASM32_LEB128_GOT)
+    return FALSE;
+
+  return TRUE;
+}
+
+/* Generate a reloc for FIXP.  */
+
+arelent *
+tc_gen_reloc (asection * sec ATTRIBUTE_UNUSED, fixS * fixp)
+{
+  arelent *reloc;
+
+  reloc = (arelent *) xmalloc (sizeof (*reloc));
+  reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
+  *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
+  reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
+
+  /* Make sure none of our internal relocations make it this far.
+     They'd better have been fully resolved by this point.  */
+  gas_assert ((int) fixp->fx_r_type > 0);
+
+  reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type);
+  if (reloc->howto == NULL)
+    {
+      as_bad_where (fixp->fx_file, fixp->fx_line,
+		    _("cannot represent `%s' relocation in object file"),
+		    bfd_get_reloc_code_name (fixp->fx_r_type));
+      return NULL;
+    }
+
+  reloc->addend = fixp->fx_offset;
+
+  return reloc;
+}
diff --git a/gas/config/tc-wasm32.h b/gas/config/tc-wasm32.h
new file mode 100644
index 0000000..220ad56
--- /dev/null
+++ b/gas/config/tc-wasm32.h
@@ -0,0 +1,89 @@
+/* This file is tc-wasm32.h.
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This file is part of GAS, the GNU Assembler.
+
+   GAS 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, or (at your option)
+   any later version.
+
+   GAS 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 GAS; see the file COPYING.  If not, write to the Free
+   Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+   02110-1301, USA.  */
+
+#define TC_WASM32
+#define TARGET_FORMAT                       "elf32-wasm32"
+#define TARGET_ARCH                        bfd_arch_wasm32
+#define TARGET_MACH                                      1
+
+/* WebAssembly is strictly little-endian.  */
+#define TARGET_BYTES_BIG_ENDIAN                          0
+#define md_number_to_chars    number_to_chars_littleendian
+
+#define DIFF_EXPR_OK
+
+/* No machine-dependent operand expressions.  */
+#define md_operand(x)
+
+/* No broken word processing.  */
+#define WORKING_DOT_WORD
+
+/* Force some relocations.  */
+#define EXTERN_FORCE_RELOC                     1
+extern int wasm32_force_relocation (struct fix *);
+#define TC_FORCE_RELOCATION(fix)               wasm32_force_relocation (fix)
+#define TC_FORCE_RELOCATION_LOCAL(fix)         1
+#define TC_FORCE_RELOCATION_SUB_SAME(fix,seg)  wasm32_force_relocation (fix)
+#define TC_FORCE_RELOCATION_SUB_ABS(fix,seg)   wasm32_force_relocation (fix)
+#define TC_FORCE_RELOCATION_SUB_LOCAL(fix,seg) wasm32_force_relocation (fix)
+#define TC_VALIDATE_FIX_SUB(fix,seg)           wasm32_force_relocation (fix)
+
+/* This is ELF, values passed to md_apply_fix don't include the symbol
+   value.  */
+#define MD_APPLY_SYM_VALUE(FIX)         0
+
+/* PC-relative relocations are relative to the relocation offset.  */
+#define MD_PCREL_FROM_SECTION(FIX, SEC) 0
+
+#define DWARF2_LINE_MIN_INSN_LENGTH 	1
+
+/* WebAssembly uses 32-bit addresses.  */
+#define TC_ADDRESS_BYTES()              4
+#define DWARF2_ADDR_SIZE(bfd)           4
+
+/* Enable cfi directives.  */
+#define TARGET_USE_CFIPOP               1
+
+/* The stack grows down, and there is no harm in claiming it is only
+   byte aligned.  */
+#define DWARF2_CIE_DATA_ALIGNMENT      -1
+
+/* Define the column that represents the PC.  FIXME: this depends on
+   the ABI. */
+#define DWARF2_DEFAULT_RETURN_COLUMN   36
+
+/* Define a hook to setup initial CFI state.  */
+#define tc_cfi_frame_initial_instructions() do { } while (0)
+
+#define elf_tc_final_processing()
+#define md_post_relax_hook
+#define md_start_line_hook()
+#define HANDLE_ALIGN(fragP)
+
+
+extern bfd_boolean wasm32_fix_adjustable (struct fix *);
+#define tc_fix_adjustable(FIX) wasm32_fix_adjustable (FIX)
+
+/* Type names for blocks and signatures.  */
+#define BLOCK_TYPE_NONE              0x40
+#define BLOCK_TYPE_I32               0x7f
+#define BLOCK_TYPE_I64               0x7e
+#define BLOCK_TYPE_F32               0x7d
+#define BLOCK_TYPE_F64               0x7c
diff --git a/gas/configure.tgt b/gas/configure.tgt
index acc3cf0..6000c7c 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -111,6 +111,7 @@ case ${cpu} in
   tilegx*)		cpu_type=tilegx endian=little ;;
   v850*)		cpu_type=v850 ;;
   visium)		cpu_type=visium endian=big ;;
+  wasm32)               cpu_type=wasm32 endian=little ;;
   x86_64*)		cpu_type=i386 arch=x86_64;;
   xgate)		cpu_type=xgate ;;
   xtensa*)		cpu_type=xtensa arch=xtensa ;;
@@ -462,6 +463,8 @@ case ${generic_target} in
 
   visium-*-elf)				fmt=elf ;;
 
+  wasm32-*-*)                           fmt=elf ;;
+
   xstormy16-*-*)			fmt=elf ;;
   
   xgate-*-*)    			fmt=elf ;;
diff --git a/gas/doc/all.texi b/gas/doc/all.texi
index 5a2dd4a..d0a1a9a 100644
--- a/gas/doc/all.texi
+++ b/gas/doc/all.texi
@@ -77,6 +77,7 @@
 @set V850
 @set VAX
 @set VISIUM
+@set WASM32
 @set XGATE
 @set XSTORMY16
 @set XTENSA
diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo
index 56a38bf..d03d0b6 100644
--- a/gas/doc/as.texinfo
+++ b/gas/doc/as.texinfo
@@ -7728,8 +7728,11 @@ subject, see the hardware manufacturer's manual.
 @ifset VISIUM
 * Visium-Dependent::            Visium Dependent Features
 @end ifset
+@ifset WASM32
+* WebAssembly-Dependent::       WebAssembly Dependent Features
+@end ifset
 @ifset XGATE
-* XGATE-Dependent::             XGATE Features
+* XGATE-Dependent::             XGATE Dependent Features
 @end ifset
 @ifset XSTORMY16
 * XSTORMY16-Dependent::         XStormy16 Dependent Features
@@ -7975,6 +7978,10 @@ family.
 @include c-visium.texi
 @end ifset
 
+@ifset WASM32
+@include c-wasm32.texi
+@end ifset
+
 @ifset XGATE
 @include c-xgate.texi
 @end ifset
diff --git a/gas/doc/c-wasm32.texi b/gas/doc/c-wasm32.texi
new file mode 100644
index 0000000..8eac7a4
--- /dev/null
+++ b/gas/doc/c-wasm32.texi
@@ -0,0 +1,119 @@
+@c Copyright (C) 2017 Free Software Foundation, Inc.
+@c This is part of the GAS manual.
+@c For copying conditions, see the file as.texinfo.
+@c man end
+
+@ifset GENERIC
+@page
+@node WebAssembly-Dependent
+@chapter WebAssembly Dependent Features
+@end ifset
+
+@ifclear GENERIC
+@node Machine Dependencies
+@chapter WebAssembly Dependent Features
+@end ifclear
+
+@cindex WebAssembly support
+@menu
+* WebAssembly-Notes::                Notes
+* WebAssembly-Syntax::               Syntax
+* WebAssembly-Floating-Point::       Floating Point
+* WebAssembly-Opcodes::              Opcodes
+* WebAssembly-module-layout::        Module Layout
+@end menu
+
+@node WebAssembly-Notes
+@section Notes
+@cindex WebAssembly notes
+@cindex notes for WebAssembly
+
+While WebAssembly provides its own module format for executables, this
+documentation describes how to use @code{@value{AS}} to produce
+intermediate ELF object format files.
+
+@node WebAssembly-Syntax
+@section Syntax
+@cindex WebAssembly Syntax
+The assembler syntax directly encodes sequences of opcodes as defined
+in the WebAssembly binary encoding specification at
+https://github.com/webassembly/spec/BinaryEncoding.md.  Structured
+sexp-style expressions are not supported as input.
+
+@menu
+* WebAssembly-Chars::                Special Characters
+* WebAssembly-Relocs::               Relocations
+* WebAssembly-Signatures::           Signatures
+@end menu
+
+@node WebAssembly-Chars
+@subsection Special Characters
+
+@cindex line comment character, WebAssembly
+@cindex WebAssembly line comment character
+@samp{#} and @samp{;} are the line comment characters.  Note that if
+@samp{#} is the first character on a line then it can also be a
+logical line number directive (@pxref{Comments}) or a preprocessor
+control command (@pxref{Preprocessing}).
+
+@node WebAssembly-Relocs
+@subsection Relocations
+@cindex WebAssembly relocations
+@cindex relocations, WebAssembly
+
+Special relocations are available by using the @samp{@@@var{plt}},
+@samp{@@@var{got}}, or @samp{@@@var{got}} suffixes after a constant
+expression, which correspond to the R_ASMJS_LEB128_PLT,
+R_ASMJS_LEB128_GOT, and R_ASMJS_LEB128_GOT_CODE relocations,
+respectively.
+
+The @samp{@@@var{plt}} suffix is followed by a symbol name in braces;
+the symbol value is used to determine the function signature for which
+a PLT stub is generated. Currently, the symbol @emph{name} is parsed
+from its last @samp{F} character to determine the argument count of
+the function, which is also necessary for generating a PLT stub.
+
+@node WebAssembly-Signatures
+@subsection Signatures
+@cindex WebAssembly signatures
+@cindex signatures, WebAssembly
+
+Function signatures are specified with the @code{signature}
+pseudo-opcode, followed by a simple function signature imitating a
+C++-mangled function type: @code{F} followed by an optional @code{v},
+then a sequence of @code{i}, @code{l}, @code{f}, and @code{d}
+characters to mark i32, i64, f32, and f64 parameters, respectively;
+followed by a final @code{E} to mark the end of the function
+signature.
+
+@node WebAssembly-Floating-Point
+@section Floating Point
+@cindex floating point, WebAssembly (@sc{ieee})
+@cindex WebAssembly floating point (@sc{ieee})
+WebAssembly uses little-endian @sc{ieee} floating-point numbers.
+
+@node WebAssembly-Opcodes
+@section Regular Opcodes
+@cindex opcodes, WebAssembly
+@cindex WebAssembly opcodes
+Ordinary instructions are encoded with the WebAssembly mnemonics as
+listed at:
+@url{https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md}.
+
+Opcodes are written directly in the order in which they are encoded,
+without going through an intermediate sexp-style expression as in the
+@code{was} format.
+
+For ``typed'' opcodes (block, if, etc.), the type of the block is
+specified in square brackets following the opcode: @code{if[i]},
+@code{if[]}.
+
+@node WebAssembly-module-layout
+@section WebAssembly Module Layout
+@cindex module layout, WebAssembly
+@cindex WebAssembly module layout
+@code{@value{AS}} will only produce ELF output, not a valid
+WebAssembly module. It is possible to make @code{@value{AS}} produce
+output in a single ELF section which becomes a valid WebAssembly
+module, but a linker script to do so may be preferrable, as it doesn't
+require running the entire module through the assembler at once.
diff --git a/gas/po/POTFILES.in b/gas/po/POTFILES.in
index 98861f7..51bbb5b 100644
--- a/gas/po/POTFILES.in
+++ b/gas/po/POTFILES.in
@@ -169,6 +169,8 @@ config/tc-vax.c
 config/tc-vax.h
 config/tc-visium.c
 config/tc-visium.h
+config/tc-wasm32.c
+config/tc-wasm32.h
 config/tc-xc16x.c
 config/tc-xc16x.h
 config/tc-xgate.c
diff --git a/gas/po/gas.pot b/gas/po/gas.pot
index 36a2f81..e971173 100644
--- a/gas/po/gas.pot
+++ b/gas/po/gas.pot
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: bug-binutils@gnu.org\n"
-"POT-Creation-Date: 2016-12-23 09:23+0100\n"
+"POT-Creation-Date: 2017-03-29 17:08+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -406,7 +406,7 @@ msgstr ""
 
 #: as.c:663
 #, c-format
-msgid "Copyright (C) 2016 Free Software Foundation, Inc.\n"
+msgid "Copyright (C) 2017 Free Software Foundation, Inc.\n"
 msgstr ""
 
 #: as.c:664
@@ -514,37 +514,37 @@ msgstr ""
 msgid "%s: data size %ld\n"
 msgstr ""
 
-#: as.c:1338
+#: as.c:1339
 #, c-format
 msgid "%d warning"
 msgstr ""
 
-#: as.c:1340
+#: as.c:1341
 #, c-format
 msgid "%d warnings"
 msgstr ""
 
-#: as.c:1342
+#: as.c:1343
 #, c-format
 msgid "%d error"
 msgstr ""
 
-#: as.c:1344
+#: as.c:1345
 #, c-format
 msgid "%d errors"
 msgstr ""
 
-#: as.c:1349
+#: as.c:1350
 #, c-format
 msgid "%s, treating warnings as errors"
 msgstr ""
 
-#: as.c:1360
+#: as.c:1361
 #, c-format
 msgid "%s, %s, generating bad object file\n"
 msgstr ""
 
-#: as.h:174
+#: as.h:173
 #, c-format
 msgid "Case value %ld unexpected at line %d of file \"%s\"\n"
 msgstr ""
@@ -558,10 +558,10 @@ msgid "failed sanity check"
 msgstr ""
 
 #: cgen.c:107 config/tc-alpha.c:2099 config/tc-alpha.c:2123
-#: config/tc-arc.c:3968 config/tc-arc.c:4026 config/tc-d10v.c:550
+#: config/tc-arc.c:3982 config/tc-arc.c:4056 config/tc-d10v.c:550
 #: config/tc-d30v.c:537 config/tc-mn10200.c:1098 config/tc-mn10300.c:1752
-#: config/tc-ppc.c:2872 config/tc-ppc.c:3049 config/tc-ppc.c:3314
-#: config/tc-s390.c:1331 config/tc-s390.c:1454 config/tc-s390.c:1587
+#: config/tc-ppc.c:2925 config/tc-ppc.c:3111 config/tc-ppc.c:3376
+#: config/tc-s390.c:1333 config/tc-s390.c:1456 config/tc-s390.c:1589
 #: config/tc-v850.c:2538 config/tc-v850.c:2609 config/tc-v850.c:2656
 #: config/tc-v850.c:2693 config/tc-v850.c:2730 config/tc-v850.c:2993
 msgid "too many fixups"
@@ -569,7 +569,7 @@ msgstr ""
 
 #: cgen.c:372 cgen.c:392 config/tc-d10v.c:461 config/tc-d30v.c:453
 #: config/tc-i370.c:2125 config/tc-mn10200.c:1040 config/tc-mn10300.c:1677
-#: config/tc-ppc.c:2914 config/tc-s390.c:1302 config/tc-v850.c:2647
+#: config/tc-ppc.c:2967 config/tc-s390.c:1304 config/tc-v850.c:2647
 #: config/tc-v850.c:2681 config/tc-v850.c:2721 config/tc-v850.c:2966
 #: config/tc-z80.c:446
 msgid "illegal operand"
@@ -578,8 +578,8 @@ msgstr ""
 #: cgen.c:396 config/tc-avr.c:716 config/tc-d10v.c:463 config/tc-d30v.c:455
 #: config/tc-h8300.c:502 config/tc-i370.c:2127 config/tc-mcore.c:661
 #: config/tc-microblaze.c:603 config/tc-mmix.c:495 config/tc-mn10200.c:1043
-#: config/tc-mn10300.c:1680 config/tc-msp430.c:417 config/tc-ppc.c:2916
-#: config/tc-s390.c:1320 config/tc-sh.c:1385 config/tc-sh64.c:2214
+#: config/tc-mn10300.c:1680 config/tc-msp430.c:417 config/tc-ppc.c:2969
+#: config/tc-s390.c:1322 config/tc-sh.c:1385 config/tc-sh64.c:2214
 #: config/tc-v850.c:2651 config/tc-v850.c:2685 config/tc-v850.c:2725
 #: config/tc-v850.c:2969 config/tc-xgate.c:895 config/tc-z80.c:557
 #: config/tc-z8k.c:349
@@ -595,22 +595,22 @@ msgid "operand mask overflow"
 msgstr ""
 
 #. We can't actually support subtracting a symbol.
-#: cgen.c:851 config/tc-arm.c:1753 config/tc-arm.c:10261 config/tc-arm.c:10313
-#: config/tc-arm.c:10570 config/tc-arm.c:11395 config/tc-arm.c:12531
-#: config/tc-arm.c:12571 config/tc-arm.c:12914 config/tc-arm.c:12955
-#: config/tc-arm.c:17288 config/tc-arm.c:17329 config/tc-avr.c:1339
+#: cgen.c:851 config/tc-arm.c:1753 config/tc-arm.c:10265 config/tc-arm.c:10317
+#: config/tc-arm.c:10574 config/tc-arm.c:11399 config/tc-arm.c:12535
+#: config/tc-arm.c:12575 config/tc-arm.c:12918 config/tc-arm.c:12959
+#: config/tc-arm.c:17292 config/tc-arm.c:17333 config/tc-avr.c:1339
 #: config/tc-avr.c:1351 config/tc-avr.c:1615 config/tc-cris.c:4067
-#: config/tc-d10v.c:1507 config/tc-d30v.c:1912 config/tc-mips.c:9256
-#: config/tc-mips.c:10561 config/tc-mips.c:11817 config/tc-mips.c:12476
-#: config/tc-nds32.c:6587 config/tc-ppc.c:6511 config/tc-spu.c:957
-#: config/tc-spu.c:981 config/tc-tilegx.c:1485 config/tc-tilepro.c:1346
-#: config/tc-v850.c:3452 config/tc-vax.c:282 config/tc-xstormy16.c:482
-#: config/tc-xtensa.c:5932 config/tc-xtensa.c:12955
+#: config/tc-d10v.c:1507 config/tc-d30v.c:1912 config/tc-mips.c:9265
+#: config/tc-mips.c:10570 config/tc-mips.c:11826 config/tc-mips.c:12485
+#: config/tc-nds32.c:6587 config/tc-pru.c:746 config/tc-pru.c:756
+#: config/tc-spu.c:957 config/tc-spu.c:981 config/tc-tilegx.c:1485
+#: config/tc-tilepro.c:1346 config/tc-v850.c:3452 config/tc-vax.c:282
+#: config/tc-xstormy16.c:482 config/tc-xtensa.c:5932 config/tc-xtensa.c:12967
 msgid "expression too complex"
 msgstr ""
 
-#: cgen.c:950 config/tc-ppc.c:6852 config/tc-ppc.c:7080 config/tc-s390.c:2364
-#: config/tc-v850.c:3504 config/tc-xstormy16.c:539
+#: cgen.c:950 config/tc-ppc.c:6955 config/tc-s390.c:2366 config/tc-v850.c:3504
+#: config/tc-xstormy16.c:539
 msgid "unresolved expression that must be resolved"
 msgstr ""
 
@@ -619,7 +619,7 @@ msgstr ""
 msgid "internal error: can't install fix for reloc type %d (`%s')"
 msgstr ""
 
-#: cgen.c:1026 config/tc-nios2.c:1360
+#: cgen.c:1026 config/tc-nios2.c:1360 config/tc-pru.c:787
 msgid "relocation is not supported"
 msgstr ""
 
@@ -719,12 +719,12 @@ msgstr ""
 msgid "Symbol `%s' can not be both weak and common"
 msgstr ""
 
-#: config/obj-coff.c:135 dw2gencfi.c:333
+#: config/obj-coff.c:135 dw2gencfi.c:334
 #, c-format
 msgid "Inserting \"%s\" into structure table failed: %s"
 msgstr ""
 
-#: config/obj-coff.c:214 config/obj-coff.c:1681 config/tc-ppc.c:5513
+#: config/obj-coff.c:214 config/obj-coff.c:1681 config/tc-ppc.c:5575
 #: config/tc-tic54x.c:3980 read.c:2959
 #, c-format
 msgid "error setting flags for \"%s\": %s"
@@ -739,7 +739,7 @@ msgstr ""
 msgid ".ln pseudo-op inside .def/.endef: ignored."
 msgstr ""
 
-#: config/obj-coff.c:509 ecoff.c:3237
+#: config/obj-coff.c:509 ecoff.c:3245
 msgid ".loc outside of .text"
 msgstr ""
 
@@ -774,15 +774,15 @@ msgid "badly formed .dim directive ignored"
 msgstr ""
 
 #: config/obj-coff.c:932
-msgid ".size pseudo-op used outside of .def/.endef ignored."
+msgid ".size pseudo-op used outside of .def/.endef: ignored."
 msgstr ""
 
 #: config/obj-coff.c:947
-msgid ".scl pseudo-op used outside of .def/.endef ignored."
+msgid ".scl pseudo-op used outside of .def/.endef: ignored."
 msgstr ""
 
 #: config/obj-coff.c:964
-msgid ".tag pseudo-op used outside of .def/.endef ignored."
+msgid ".tag pseudo-op used outside of .def/.endef: ignored."
 msgstr ""
 
 #: config/obj-coff.c:981
@@ -791,11 +791,11 @@ msgid "tag not found for .tag %s"
 msgstr ""
 
 #: config/obj-coff.c:994
-msgid ".type pseudo-op used outside of .def/.endef ignored."
+msgid ".type pseudo-op used outside of .def/.endef: ignored."
 msgstr ""
 
 #: config/obj-coff.c:1013
-msgid ".val pseudo-op used outside of .def/.endef ignored."
+msgid ".val pseudo-op used outside of .def/.endef: ignored."
 msgstr ""
 
 #: config/obj-coff.c:1160
@@ -824,7 +824,7 @@ msgstr ""
 msgid "unsupported section attribute '%c'"
 msgstr ""
 
-#: config/obj-coff.c:1650 config/tc-ppc.c:5495
+#: config/obj-coff.c:1650 config/tc-ppc.c:5557
 #, c-format
 msgid "unknown section attribute '%c'"
 msgstr ""
@@ -847,211 +847,211 @@ msgstr ""
 msgid "Can't set register masks"
 msgstr ""
 
-#: config/obj-elf.c:343 config/tc-sparc.c:4422 config/tc-v850.c:511
+#: config/obj-elf.c:348 config/tc-sparc.c:4461 config/tc-v850.c:511
 #, c-format
 msgid "bad .common segment %s"
 msgstr ""
 
-#: config/obj-elf.c:419
+#: config/obj-elf.c:424
 msgid "Missing symbol name in directive"
 msgstr ""
 
-#: config/obj-elf.c:627
+#: config/obj-elf.c:632
 #, c-format
 msgid "setting incorrect section type for %s"
 msgstr ""
 
-#: config/obj-elf.c:632
+#: config/obj-elf.c:637
 #, c-format
 msgid "ignoring incorrect section type for %s"
 msgstr ""
 
-#: config/obj-elf.c:683
+#: config/obj-elf.c:688
 #, c-format
 msgid "setting incorrect section attributes for %s"
 msgstr ""
 
-#: config/obj-elf.c:739
+#: config/obj-elf.c:744
 #, c-format
 msgid "ignoring changed section type for %s"
 msgstr ""
 
-#: config/obj-elf.c:751
+#: config/obj-elf.c:756
 #, c-format
 msgid "ignoring changed section attributes for %s"
 msgstr ""
 
-#: config/obj-elf.c:758
+#: config/obj-elf.c:763
 #, c-format
 msgid "ignoring changed section entity size for %s"
 msgstr ""
 
-#: config/obj-elf.c:819
+#: config/obj-elf.c:824
 msgid "unrecognized .section attribute: want a,e,w,x,M,S,G,T or number"
 msgstr ""
 
-#: config/obj-elf.c:879
+#: config/obj-elf.c:884
 msgid "extraneous characters at end of numeric section type"
 msgstr ""
 
-#: config/obj-elf.c:885 read.c:2943
+#: config/obj-elf.c:890 read.c:2943
 msgid "unrecognized section type"
 msgstr ""
 
-#: config/obj-elf.c:917
+#: config/obj-elf.c:922
 msgid "unrecognized section attribute"
 msgstr ""
 
-#: config/obj-elf.c:948 config/tc-alpha.c:4208
+#: config/obj-elf.c:953 config/tc-alpha.c:4208
 msgid "missing name"
 msgstr ""
 
-#: config/obj-elf.c:1107
+#: config/obj-elf.c:1112
 msgid "invalid merge entity size"
 msgstr ""
 
-#: config/obj-elf.c:1114
+#: config/obj-elf.c:1119
 msgid "entity size for SHF_MERGE not specified"
 msgstr ""
 
-#: config/obj-elf.c:1120
+#: config/obj-elf.c:1125
 msgid "? section flag ignored with G present"
 msgstr ""
 
-#: config/obj-elf.c:1144
+#: config/obj-elf.c:1149
 msgid "group name for SHF_GROUP not specified"
 msgstr ""
 
-#: config/obj-elf.c:1167
+#: config/obj-elf.c:1172
 msgid "character following name is not '#'"
 msgstr ""
 
-#: config/obj-elf.c:1286
+#: config/obj-elf.c:1291
 msgid ".previous without corresponding .section; ignored"
 msgstr ""
 
-#: config/obj-elf.c:1312
+#: config/obj-elf.c:1317
 msgid ".popsection without corresponding .pushsection; ignored"
 msgstr ""
 
-#: config/obj-elf.c:1358
+#: config/obj-elf.c:1363
 msgid "expected comma after name in .symver"
 msgstr ""
 
-#: config/obj-elf.c:1381
+#: config/obj-elf.c:1386
 #, c-format
 msgid "missing version name in `%s' for symbol `%s'"
 msgstr ""
 
-#: config/obj-elf.c:1392
+#: config/obj-elf.c:1397
 #, c-format
 msgid "multiple versions [`%s'|`%s'] for symbol `%s'"
 msgstr ""
 
-#: config/obj-elf.c:1428
+#: config/obj-elf.c:1433
 #, c-format
 msgid "expected `%s' to have already been set for .vtable_inherit"
 msgstr ""
 
-#: config/obj-elf.c:1438
+#: config/obj-elf.c:1443
 msgid "expected comma after name in .vtable_inherit"
 msgstr ""
 
-#: config/obj-elf.c:1490
+#: config/obj-elf.c:1495
 msgid "expected comma after name in .vtable_entry"
 msgstr ""
 
-#: config/obj-elf.c:1620
+#: config/obj-elf.c:1625
 #, c-format
 msgid "Attribute name not recognised: %s"
 msgstr ""
 
-#: config/obj-elf.c:1637
+#: config/obj-elf.c:1642
 msgid "expected numeric constant"
 msgstr ""
 
-#: config/obj-elf.c:1646 config/tc-arm.c:6441
+#: config/obj-elf.c:1651 config/tc-arm.c:6445
 msgid "expected comma"
 msgstr ""
 
-#: config/obj-elf.c:1679
+#: config/obj-elf.c:1684
 msgid "bad string constant"
 msgstr ""
 
-#: config/obj-elf.c:1683
+#: config/obj-elf.c:1688
 msgid "expected <tag> , <value>"
 msgstr ""
 
-#: config/obj-elf.c:1802
+#: config/obj-elf.c:1807
 msgid "expected quoted string"
 msgstr ""
 
-#: config/obj-elf.c:1822
+#: config/obj-elf.c:1827
 #, c-format
 msgid "expected comma after name `%s' in .size directive"
 msgstr ""
 
-#: config/obj-elf.c:1831
+#: config/obj-elf.c:1836
 msgid "missing expression in .size directive"
 msgstr ""
 
-#: config/obj-elf.c:1954
+#: config/obj-elf.c:1959
 #, c-format
 msgid "symbol '%s' is already defined"
 msgstr ""
 
-#: config/obj-elf.c:1975
+#: config/obj-elf.c:1980
 #, c-format
 msgid "symbol type \"%s\" is supported only by GNU and FreeBSD targets"
 msgstr ""
 
-#: config/obj-elf.c:1987
+#: config/obj-elf.c:1992
 #, c-format
 msgid "symbol type \"%s\" is supported only by GNU targets"
 msgstr ""
 
-#: config/obj-elf.c:1998
+#: config/obj-elf.c:2003
 #, c-format
 msgid "unrecognized symbol type \"%s\""
 msgstr ""
 
-#: config/obj-elf.c:2165 config/obj-elf.c:2168
+#: config/obj-elf.c:2170 config/obj-elf.c:2173
 #, c-format
 msgid ".size expression for %s does not evaluate to a constant"
 msgstr ""
 
-#: config/obj-elf.c:2202
+#: config/obj-elf.c:2207
 #, c-format
 msgid ""
 "invalid attempt to declare external version name as default in symbol `%s'"
 msgstr ""
 
-#: config/obj-elf.c:2264 ecoff.c:3592
+#: config/obj-elf.c:2269 ecoff.c:3600
 #, c-format
 msgid "symbol `%s' can not be both weak and common"
 msgstr ""
 
-#: config/obj-elf.c:2379
+#: config/obj-elf.c:2384
 #, c-format
 msgid "assuming all members of group `%s' are COMDAT"
 msgstr ""
 
-#: config/obj-elf.c:2391
+#: config/obj-elf.c:2396
 #, c-format
 msgid "can't create group: %s"
 msgstr ""
 
-#: config/obj-elf.c:2529
+#: config/obj-elf.c:2534
 #, c-format
 msgid "failed to set up debugging information: %s"
 msgstr ""
 
-#: config/obj-elf.c:2549
+#: config/obj-elf.c:2554
 #, c-format
 msgid "can't start writing .mdebug section: %s"
 msgstr ""
 
-#: config/obj-elf.c:2557
+#: config/obj-elf.c:2562
 #, c-format
 msgid "could not write .mdebug section: %s"
 msgstr ""
@@ -1074,7 +1074,7 @@ msgstr ""
 
 #: config/obj-macho.c:195
 #, c-format
-msgid "cannot overide zerofill section type for `%s,%s'"
+msgid "cannot override zerofill section type for `%s,%s'"
 msgstr ""
 
 #: config/obj-macho.c:249
@@ -1101,7 +1101,7 @@ msgid "missing sizeof_stub expression"
 msgstr ""
 
 #: config/obj-macho.c:476 config/tc-ia64.c:1083 config/tc-ia64.c:11770
-#: config/tc-score.c:6103 read.c:1714
+#: config/tc-score.c:6103 expr.c:1172 expr.c:1325 read.c:1714
 msgid "expected symbol name"
 msgstr ""
 
@@ -1118,7 +1118,7 @@ msgstr ""
 msgid "size (%ld) out of range, ignored"
 msgstr ""
 
-#: config/obj-macho.c:514 config/tc-score.c:6264 ecoff.c:3351 read.c:1770
+#: config/obj-macho.c:514 config/tc-score.c:6264 ecoff.c:3359 read.c:1770
 #: read.c:1875 read.c:2626 read.c:3257 read.c:3636 symbols.c:339 symbols.c:435
 #, c-format
 msgid "symbol `%s' is already defined"
@@ -1359,12 +1359,12 @@ msgid "invalid register type %d"
 msgstr ""
 
 #: config/tc-aarch64.c:586 config/tc-aarch64.c:588 config/tc-arm.c:1048
-#: config/tc-score.c:6514 expr.c:1363 read.c:2608
+#: config/tc-score.c:6514 expr.c:1385 read.c:2608
 msgid "bad expression"
 msgstr ""
 
 #: config/tc-aarch64.c:598 config/tc-arm.c:1059 config/tc-i860.c:1003
-#: config/tc-sparc.c:3327
+#: config/tc-sparc.c:3366
 msgid "bad segment"
 msgstr ""
 
@@ -1496,8 +1496,8 @@ msgstr ""
 msgid "literal pool overflow"
 msgstr ""
 
-#: config/tc-aarch64.c:1902 config/tc-aarch64.c:5887 config/tc-arm.c:3531
-#: config/tc-arm.c:6949
+#: config/tc-aarch64.c:1902 config/tc-aarch64.c:5892 config/tc-arm.c:3531
+#: config/tc-arm.c:6953
 msgid "unrecognized relocation suffix"
 msgstr ""
 
@@ -1513,11 +1513,11 @@ msgstr ""
 msgid "missing immediate expression"
 msgstr ""
 
-#: config/tc-aarch64.c:2343 config/tc-aarch64.c:5711 config/tc-aarch64.c:5731
+#: config/tc-aarch64.c:2343 config/tc-aarch64.c:5716 config/tc-aarch64.c:5736
 msgid "invalid floating-point constant"
 msgstr ""
 
-#: config/tc-aarch64.c:2973 config/tc-arm.c:5107 config/tc-arm.c:5116
+#: config/tc-aarch64.c:2973 config/tc-arm.c:5111 config/tc-arm.c:5120
 msgid "shift expression expected"
 msgstr ""
 
@@ -1620,7 +1620,7 @@ msgstr ""
 msgid "invalid expression in the address"
 msgstr ""
 
-#: config/tc-aarch64.c:3566 config/tc-arm.c:5642 config/tc-arm.c:6219
+#: config/tc-aarch64.c:3566 config/tc-arm.c:5646 config/tc-arm.c:6223
 msgid "']' expected"
 msgstr ""
 
@@ -1628,7 +1628,7 @@ msgstr ""
 msgid "register offset not allowed in pre-indexed addressing mode"
 msgstr ""
 
-#: config/tc-aarch64.c:3589 config/tc-arm.c:5678
+#: config/tc-aarch64.c:3589 config/tc-arm.c:5682
 msgid "cannot combine pre- and post-indexing"
 msgstr ""
 
@@ -1715,7 +1715,7 @@ msgstr ""
 msgid "%s out of range %d to %d at operand %d -- `%s'"
 msgstr ""
 
-#: config/tc-aarch64.c:4652 config/tc-aarch64.c:4656 config/tc-aarch64.c:6416
+#: config/tc-aarch64.c:4652 config/tc-aarch64.c:4656 config/tc-aarch64.c:6422
 msgid "immediate value"
 msgstr ""
 
@@ -1763,328 +1763,328 @@ msgstr ""
 msgid "the top half of a 128-bit FP/SIMD register is expected"
 msgstr ""
 
-#: config/tc-aarch64.c:5490 config/tc-arm.c:1883 config/tc-arm.c:1928
+#: config/tc-aarch64.c:5493 config/tc-arm.c:1883 config/tc-arm.c:1928
 #: config/tc-h8300.c:1048
 msgid "invalid register list"
 msgstr ""
 
-#: config/tc-aarch64.c:5510
+#: config/tc-aarch64.c:5513
 msgid "missing type suffix"
 msgstr ""
 
-#: config/tc-aarch64.c:5529
+#: config/tc-aarch64.c:5532
 msgid "C0 - C15 expected"
 msgstr ""
 
-#: config/tc-aarch64.c:5626 config/tc-aarch64.c:5650
+#: config/tc-aarch64.c:5631 config/tc-aarch64.c:5655
 msgid "immediate zero expected"
 msgstr ""
 
-#: config/tc-aarch64.c:5746
+#: config/tc-aarch64.c:5751
 msgid "shift not allowed for bitmask immediate"
 msgstr ""
 
-#: config/tc-aarch64.c:5800
+#: config/tc-aarch64.c:5805
 msgid "can't mix relocation modifier with explicit shift"
 msgstr ""
 
-#: config/tc-aarch64.c:5848
+#: config/tc-aarch64.c:5853
 msgid "invalid condition"
 msgstr ""
 
-#: config/tc-aarch64.c:5874
+#: config/tc-aarch64.c:5879
 msgid "invalid pc-relative address"
 msgstr ""
 
 #. Only permit "=value" in the literal load instructions.
 #. The literal will be generated by programmer_friendly_fixup.
-#: config/tc-aarch64.c:5882
+#: config/tc-aarch64.c:5887
 msgid "invalid use of \"=immediate\""
 msgstr ""
 
-#: config/tc-aarch64.c:5947 config/tc-aarch64.c:5979 config/tc-aarch64.c:5997
-#: config/tc-aarch64.c:6019 config/tc-aarch64.c:6038 config/tc-aarch64.c:6057
-#: config/tc-aarch64.c:6076 config/tc-aarch64.c:6110 config/tc-aarch64.c:6117
-#: config/tc-aarch64.c:6146 config/tc-aarch64.c:6171 config/tc-aarch64.c:6187
-#: config/tc-aarch64.c:6211
+#: config/tc-aarch64.c:5952 config/tc-aarch64.c:5984 config/tc-aarch64.c:6002
+#: config/tc-aarch64.c:6024 config/tc-aarch64.c:6043 config/tc-aarch64.c:6062
+#: config/tc-aarch64.c:6081 config/tc-aarch64.c:6116 config/tc-aarch64.c:6123
+#: config/tc-aarch64.c:6152 config/tc-aarch64.c:6177 config/tc-aarch64.c:6193
+#: config/tc-aarch64.c:6217
 msgid "invalid addressing mode"
 msgstr ""
 
-#: config/tc-aarch64.c:5963
+#: config/tc-aarch64.c:5968
 msgid "the optional immediate offset can only be 0"
 msgstr ""
 
-#: config/tc-aarch64.c:6002 config/tc-aarch64.c:6024 config/tc-aarch64.c:6043
+#: config/tc-aarch64.c:6007 config/tc-aarch64.c:6029 config/tc-aarch64.c:6048
 msgid "relocation not allowed"
 msgstr ""
 
-#: config/tc-aarch64.c:6086
+#: config/tc-aarch64.c:6091
 msgid "writeback value must be an immediate constant"
 msgstr ""
 
 #. Make sure this has priority over
 #. "invalid addressing mode".
-#: config/tc-aarch64.c:6125
+#: config/tc-aarch64.c:6131
 msgid "constant offset required"
 msgstr ""
 
-#: config/tc-aarch64.c:6221
+#: config/tc-aarch64.c:6227
 msgid "unknown or missing system register name"
 msgstr ""
 
-#: config/tc-aarch64.c:6231
+#: config/tc-aarch64.c:6237
 msgid "unknown or missing PSTATE field name"
 msgstr ""
 
-#: config/tc-aarch64.c:6255
+#: config/tc-aarch64.c:6261
 msgid "unknown or missing operation name"
 msgstr ""
 
-#: config/tc-aarch64.c:6268
+#: config/tc-aarch64.c:6274
 msgid "the specified option is not accepted in ISB"
 msgstr ""
 
-#: config/tc-aarch64.c:6294 config/tc-aarch64.c:7416 config/tc-arm.c:7164
+#: config/tc-aarch64.c:6300 config/tc-aarch64.c:7422 config/tc-arm.c:7168
 #, c-format
 msgid "unhandled operand code %d"
 msgstr ""
 
-#: config/tc-aarch64.c:6336
+#: config/tc-aarch64.c:6342
 msgid "unexpected comma before the omitted optional operand"
 msgstr ""
 
-#: config/tc-aarch64.c:6364
+#: config/tc-aarch64.c:6370
 msgid "unexpected characters following instruction"
 msgstr ""
 
-#: config/tc-aarch64.c:6442 config/tc-arm.c:5218 config/tc-arm.c:5777
-#: config/tc-arm.c:7911
+#: config/tc-aarch64.c:6448 config/tc-arm.c:5222 config/tc-arm.c:5781
+#: config/tc-arm.c:7915
 msgid "constant expression expected"
 msgstr ""
 
-#: config/tc-aarch64.c:6449
+#: config/tc-aarch64.c:6455
 msgid "literal pool insertion failed"
 msgstr ""
 
-#: config/tc-aarch64.c:6518 config/tc-aarch64.c:6530
+#: config/tc-aarch64.c:6524 config/tc-aarch64.c:6536
 #, c-format
 msgid "unpredictable transfer with writeback -- `%s'"
 msgstr ""
 
-#: config/tc-aarch64.c:6534
+#: config/tc-aarch64.c:6540
 #, c-format
 msgid "unpredictable load of register pair -- `%s'"
 msgstr ""
 
-#: config/tc-aarch64.c:6611
+#: config/tc-aarch64.c:6617
 #, c-format
 msgid "unknown mnemonic `%s' -- `%s'"
 msgstr ""
 
-#: config/tc-aarch64.c:6619
+#: config/tc-aarch64.c:6625
 #, c-format
 msgid "unexpected comma after the mnemonic name `%s' -- `%s'"
 msgstr ""
 
-#: config/tc-aarch64.c:6677
+#: config/tc-aarch64.c:6683
 #, c-format
 msgid "selected processor does not support `%s'"
 msgstr ""
 
-#: config/tc-aarch64.c:7079 config/tc-arm.c:22521
+#: config/tc-aarch64.c:7085 config/tc-arm.c:22525
 msgid "GOT already in the symbol table"
 msgstr ""
 
-#: config/tc-aarch64.c:7241
+#: config/tc-aarch64.c:7247
 msgid "immediate cannot be moved by a single instruction"
 msgstr ""
 
-#: config/tc-aarch64.c:7284 config/tc-aarch64.c:7329 config/tc-aarch64.c:7355
-#: config/tc-arm.c:15313 config/tc-arm.c:15340 config/tc-arm.c:15982
-#: config/tc-arm.c:16469 config/tc-arm.c:17291 config/tc-arm.c:17331
+#: config/tc-aarch64.c:7290 config/tc-aarch64.c:7335 config/tc-aarch64.c:7361
+#: config/tc-arm.c:15317 config/tc-arm.c:15344 config/tc-arm.c:15986
+#: config/tc-arm.c:16473 config/tc-arm.c:17295 config/tc-arm.c:17335
 #: config/tc-metag.c:2444 config/tc-metag.c:2453 config/tc-metag.c:2492
 #: config/tc-metag.c:2501 config/tc-metag.c:3021 config/tc-metag.c:3030
 msgid "immediate out of range"
 msgstr ""
 
-#: config/tc-aarch64.c:7348 config/tc-metag.c:4656 config/tc-xtensa.c:4184
+#: config/tc-aarch64.c:7354 config/tc-metag.c:4656 config/tc-xtensa.c:4184
 msgid "invalid immediate"
 msgstr ""
 
-#: config/tc-aarch64.c:7411 config/tc-tic6x.c:3861 config/tc-tic6x.c:3926
+#: config/tc-aarch64.c:7417 config/tc-tic6x.c:3861 config/tc-tic6x.c:3926
 #: config/tc-tic6x.c:3953 config/tc-tic6x.c:3981
 msgid "immediate offset out of range"
 msgstr ""
 
-#: config/tc-aarch64.c:7485 config/tc-arm.c:22859 config/tc-arm.c:22927
-#: config/tc-arm.c:23209
+#: config/tc-aarch64.c:7491 config/tc-arm.c:22863 config/tc-arm.c:22931
+#: config/tc-arm.c:23213
 #, c-format
 msgid "undefined symbol %s used as an immediate value"
 msgstr ""
 
-#: config/tc-aarch64.c:7497
+#: config/tc-aarch64.c:7503
 msgid "pc-relative load offset not word aligned"
 msgstr ""
 
-#: config/tc-aarch64.c:7500
+#: config/tc-aarch64.c:7506
 msgid "pc-relative load offset out of range"
 msgstr ""
 
-#: config/tc-aarch64.c:7512
+#: config/tc-aarch64.c:7518
 msgid "pc-relative address offset out of range"
 msgstr ""
 
-#: config/tc-aarch64.c:7524 config/tc-aarch64.c:7539
+#: config/tc-aarch64.c:7530 config/tc-aarch64.c:7545
 msgid "conditional branch target not word aligned"
 msgstr ""
 
-#: config/tc-aarch64.c:7527 config/tc-aarch64.c:7542 config/tc-arm.c:23500
+#: config/tc-aarch64.c:7533 config/tc-aarch64.c:7548 config/tc-arm.c:23504
 msgid "conditional branch out of range"
 msgstr ""
 
-#: config/tc-aarch64.c:7555
+#: config/tc-aarch64.c:7561
 msgid "branch target not word aligned"
 msgstr ""
 
-#: config/tc-aarch64.c:7558 config/tc-arm.c:810 config/tc-mips.c:15482
-#: config/tc-mips.c:15498 config/tc-mips.c:15588
+#: config/tc-aarch64.c:7564 config/tc-arm.c:810 config/tc-mips.c:15507
+#: config/tc-mips.c:15523 config/tc-mips.c:15613
 msgid "branch out of range"
 msgstr ""
 
-#: config/tc-aarch64.c:7610 config/tc-arm.c:23100 config/tc-arm.c:23115
-#: config/tc-arm.c:23130 config/tc-arm.c:23141 config/tc-arm.c:23164
-#: config/tc-arm.c:23962 config/tc-moxie.c:716 config/tc-pj.c:452
+#: config/tc-aarch64.c:7616 config/tc-arm.c:23104 config/tc-arm.c:23119
+#: config/tc-arm.c:23134 config/tc-arm.c:23145 config/tc-arm.c:23168
+#: config/tc-arm.c:23966 config/tc-moxie.c:716 config/tc-pj.c:452
 #: config/tc-sh.c:4293
 msgid "offset out of range"
 msgstr ""
 
-#: config/tc-aarch64.c:7625
+#: config/tc-aarch64.c:7631
 msgid "unsigned value out of range"
 msgstr ""
 
-#: config/tc-aarch64.c:7633
+#: config/tc-aarch64.c:7639
 msgid "signed value out of range"
 msgstr ""
 
-#: config/tc-aarch64.c:7775
+#: config/tc-aarch64.c:7781
 #, c-format
 msgid "unexpected %s fixup"
 msgstr ""
 
-#: config/tc-aarch64.c:7841 config/tc-arm.c:24471 config/tc-arm.c:24492
-#: config/tc-mips.c:17772 config/tc-or1k.c:348 config/tc-score.c:7480
+#: config/tc-aarch64.c:7847 config/tc-arm.c:24475 config/tc-arm.c:24496
+#: config/tc-mips.c:17796 config/tc-or1k.c:348 config/tc-score.c:7480
 #, c-format
 msgid "cannot represent %s relocation in this object file format"
 msgstr ""
 
-#: config/tc-aarch64.c:7874
+#: config/tc-aarch64.c:7880
 #, c-format
 msgid "cannot do %u-byte relocation"
 msgstr ""
 
-#: config/tc-aarch64.c:8169 config/tc-arm.c:24952 config/tc-score.c:6297
+#: config/tc-aarch64.c:8175 config/tc-arm.c:24956 config/tc-score.c:6297
 #: config/tc-score.c:6527 config/tc-score.c:6532
 msgid "virtual memory exhausted"
 msgstr ""
 
-#: config/tc-aarch64.c:8327 config/tc-arm.c:25281
+#: config/tc-aarch64.c:8333 config/tc-arm.c:25285
 msgid "assemble for big-endian"
 msgstr ""
 
-#: config/tc-aarch64.c:8328 config/tc-arm.c:25282
+#: config/tc-aarch64.c:8334 config/tc-arm.c:25286
 msgid "assemble for little-endian"
 msgstr ""
 
-#: config/tc-aarch64.c:8331
+#: config/tc-aarch64.c:8337
 msgid "temporary switch for dumping"
 msgstr ""
 
-#: config/tc-aarch64.c:8333
+#: config/tc-aarch64.c:8339
 msgid "output verbose error messages"
 msgstr ""
 
-#: config/tc-aarch64.c:8335
+#: config/tc-aarch64.c:8341
 msgid "do not output verbose error messages"
 msgstr ""
 
-#: config/tc-aarch64.c:8509 config/tc-arm.c:25873
+#: config/tc-aarch64.c:8521 config/tc-arm.c:25878
 msgid "invalid architectural extension"
 msgstr ""
 
-#: config/tc-aarch64.c:8534 config/tc-arm.c:25905
+#: config/tc-aarch64.c:8546 config/tc-arm.c:25910
 msgid "must specify extensions to add before specifying those to remove"
 msgstr ""
 
-#: config/tc-aarch64.c:8542 config/tc-arm.c:25913
+#: config/tc-aarch64.c:8554 config/tc-arm.c:25918
 msgid "missing architectural extension"
 msgstr ""
 
-#: config/tc-aarch64.c:8569 config/tc-arm.c:25960
+#: config/tc-aarch64.c:8581 config/tc-arm.c:25965
 #, c-format
 msgid "unknown architectural extension `%s'"
 msgstr ""
 
-#: config/tc-aarch64.c:8593 config/tc-arm.c:25994 config/tc-metag.c:5834
+#: config/tc-aarch64.c:8605 config/tc-arm.c:25999 config/tc-metag.c:5834
 #, c-format
 msgid "missing cpu name `%s'"
 msgstr ""
 
-#: config/tc-aarch64.c:8607 config/tc-aarch64.c:8824 config/tc-arm.c:26026
-#: config/tc-arm.c:26637 config/tc-metag.c:5845
+#: config/tc-aarch64.c:8619 config/tc-aarch64.c:8836 config/tc-arm.c:26031
+#: config/tc-arm.c:26642 config/tc-metag.c:5845
 #, c-format
 msgid "unknown cpu `%s'"
 msgstr ""
 
-#: config/tc-aarch64.c:8625 config/tc-arm.c:26044
+#: config/tc-aarch64.c:8637 config/tc-arm.c:26049
 #, c-format
 msgid "missing architecture name `%s'"
 msgstr ""
 
-#: config/tc-aarch64.c:8639 config/tc-aarch64.c:8871 config/tc-arm.c:26061
-#: config/tc-arm.c:26671 config/tc-arm.c:26702 config/tc-score.c:7715
+#: config/tc-aarch64.c:8651 config/tc-aarch64.c:8883 config/tc-arm.c:26066
+#: config/tc-arm.c:26676 config/tc-arm.c:26707 config/tc-score.c:7715
 #, c-format
 msgid "unknown architecture `%s'\n"
 msgstr ""
 
-#: config/tc-aarch64.c:8662
+#: config/tc-aarch64.c:8674
 #, c-format
 msgid "missing abi name `%s'"
 msgstr ""
 
-#: config/tc-aarch64.c:8673
+#: config/tc-aarch64.c:8685
 #, c-format
 msgid "unknown abi `%s'\n"
 msgstr ""
 
-#: config/tc-aarch64.c:8679
+#: config/tc-aarch64.c:8691
 msgid "<abi name>\t  specify for ABI <abi name>"
 msgstr ""
 
-#: config/tc-aarch64.c:8682 config/tc-arm.c:26148 config/tc-metag.c:5911
+#: config/tc-aarch64.c:8694 config/tc-arm.c:26153 config/tc-metag.c:5911
 msgid "<cpu name>\t  assemble for CPU <cpu name>"
 msgstr ""
 
-#: config/tc-aarch64.c:8684 config/tc-arm.c:26150
+#: config/tc-aarch64.c:8696 config/tc-arm.c:26155
 msgid "<arch name>\t  assemble for architecture <arch name>"
 msgstr ""
 
-#: config/tc-aarch64.c:8723 config/tc-aarch64.c:8743 config/tc-arm.c:26206
-#: config/tc-arm.c:26224 config/tc-arm.c:26244 config/tc-metag.c:5936
+#: config/tc-aarch64.c:8735 config/tc-aarch64.c:8755 config/tc-arm.c:26211
+#: config/tc-arm.c:26229 config/tc-arm.c:26249 config/tc-metag.c:5936
 #, c-format
 msgid "option `-%c%s' is deprecated: %s"
 msgstr ""
 
-#: config/tc-aarch64.c:8763
+#: config/tc-aarch64.c:8775
 #, c-format
 msgid " AArch64-specific assembler options:\n"
 msgstr ""
 
-#: config/tc-aarch64.c:8774 config/tc-arc.c:3499 config/tc-arm.c:26275
+#: config/tc-aarch64.c:8786 config/tc-arc.c:3503 config/tc-arm.c:26280
 #, c-format
 msgid "  -EB                     assemble code for a big-endian cpu\n"
 msgstr ""
 
-#: config/tc-aarch64.c:8779 config/tc-arc.c:3501 config/tc-arm.c:26280
+#: config/tc-aarch64.c:8791 config/tc-arc.c:3505 config/tc-arm.c:26285
 #, c-format
 msgid "  -EL                     assemble code for a little-endian cpu\n"
 msgstr ""
@@ -2159,7 +2159,7 @@ msgid "opcode `%s' not supported for target %s"
 msgstr ""
 
 #: config/tc-alpha.c:1192 config/tc-alpha.c:3366 config/tc-avr.c:1693
-#: config/tc-msp430.c:3914
+#: config/tc-msp430.c:3913 config/tc-wasm32.c:753
 #, c-format
 msgid "unknown opcode `%s'"
 msgstr ""
@@ -2239,8 +2239,8 @@ msgstr ""
 msgid "sequence number in use for !tlsgd!%ld"
 msgstr ""
 
-#: config/tc-alpha.c:1996 config/tc-arc.c:2768 config/tc-mn10200.c:854
-#: config/tc-mn10300.c:1150 config/tc-ppc.c:1838 config/tc-s390.c:673
+#: config/tc-alpha.c:1996 config/tc-arc.c:2772 config/tc-mn10200.c:854
+#: config/tc-mn10300.c:1150 config/tc-ppc.c:1891 config/tc-s390.c:675
 #: config/tc-tilegx.c:427 config/tc-tilegx.c:477 config/tc-tilepro.c:383
 msgid "operand"
 msgstr ""
@@ -2258,22 +2258,22 @@ msgid "can not resolve expression"
 msgstr ""
 
 #: config/tc-alpha.c:3514 config/tc-i370.c:1054 config/tc-microblaze.c:198
-#: config/tc-ppc.c:2160 config/tc-ppc.c:5260
+#: config/tc-ppc.c:2213 config/tc-ppc.c:5322
 #, c-format
 msgid ".COMMon length (%ld.) <0! Ignored."
 msgstr ""
 
-#: config/tc-alpha.c:3525 config/tc-ia64.c:1094 config/tc-sparc.c:4293
+#: config/tc-alpha.c:3525 config/tc-ia64.c:1094 config/tc-sparc.c:4332
 #: config/tc-v850.c:306
 msgid "Ignoring attempt to re-define symbol"
 msgstr ""
 
-#: config/tc-alpha.c:3617 config/tc-sparc.c:4301
+#: config/tc-alpha.c:3617 config/tc-sparc.c:4340
 #, c-format
 msgid "Length of .comm \"%s\" is already %ld. Not changed to %ld."
 msgstr ""
 
-#: config/tc-alpha.c:3724 ecoff.c:3052
+#: config/tc-alpha.c:3724
 msgid ".ent directive has no name"
 msgstr "[...]

[diff truncated at 100000 bytes]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]