This is the mail archive of the
binutils@sourceware.org
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>
Hi Pip,
> 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
> +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.
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 ?
Cheers
Nick