[PATCH 1/2] [WebAssembly] GAS support
Nick Clifton
nickc@redhat.com
Thu Mar 30 10:05:00 GMT 2017
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
More information about the Binutils
mailing list