[MC] Add support for the .rva assembler directive for COFF targets
authorMartin Storsjo <martin@martin.st>
Thu, 26 Jul 2018 20:11:26 +0000 (20:11 +0000)
committerMartin Storsjo <martin@martin.st>
Thu, 26 Jul 2018 20:11:26 +0000 (20:11 +0000)
commit390bce43220111640bfe94733282ae7db4708f82
tree31f0e39688b71bf1077cdead6cb942935fc86bc8
parente6e75bf84c94e03313594c1b5faf2b8065969c39
[MC] Add support for the .rva assembler directive for COFF targets

Even though gas doesn't document it, it has been supported there for
a very long time.

This produces the 32 bit relative virtual address (aka image relative
address) for a given symbol. ".rva foo" is essentially equal to
".long foo@imgrel".

Differential Revision: https://reviews.llvm.org/D49821

llvm-svn: 338063
llvm/include/llvm/MC/MCStreamer.h
llvm/include/llvm/MC/MCWinCOFFStreamer.h
llvm/lib/MC/MCAsmStreamer.cpp
llvm/lib/MC/MCParser/COFFAsmParser.cpp
llvm/lib/MC/MCStreamer.cpp
llvm/lib/MC/MCWinCOFFStreamer.cpp
llvm/test/MC/COFF/relocation-imgrel.s