This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH 1/2] [WebAssembly] GAS support
- From: Nick Clifton <nickc at redhat dot com>
- To: Pip Cet <pipcet at gmail dot com>, binutils at sourceware dot org
- Date: Thu, 30 Mar 2017 11:05:28 +0100
- Subject: Re: [PATCH 1/2] [WebAssembly] GAS support
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=nickc at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 010CC80483
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 010CC80483
- References: <CAOqdjBeNadWo_P=ApawgM5QUo6PinMokF0QHKRHyot8_Yaot-A@mail.gmail.com>
> This patch adds support for assembling WebAssembly opcodes into ELF
> binaries (which can then be converted into WebAssembly modules). In
> order to pass tests, it also adds the first wasm32-specific relocation
> (other than R_WASM32_NONE), a simple absolute 32-bit relocation.
Thanks for doing this. I have applied the patch basically as is. The
only changes I made were to add entries in the gas/NEWS and binutils/NEWS
files, mentioning this new support. Oh - and I have tweaked your gas
documentation, so that it is now built as part of the general assembler
documentation. I did have to rearrange the c-wasm32.texi file a bit in
order to make the texinfo conversion work, so you may want to check that.
(Oh, c-wasm32.texi is a renamed version of your wasm32.texi file. The
convention is that target specific texinfo files in the gas/doc directory
are named c-<target>.texi).
> +++ b/bfd/reloc.c
> + 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
> + WebAssembly relocations.
One thing that I did note is that you are defining these new relocation names
in bfd/reloc.c but not handling them in elf32-wasm.c. Are they going to be
subject to a future patch ?