OSDN Git Service

[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)
commit70e518f523466903fefea9552a427ac67b736c3b
tree871251d56713be32da11a920945acf421f6b9192
parent1028e2499b54c8d120e3f2088bb8db49400194ce
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338063 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCStreamer.h
include/llvm/MC/MCWinCOFFStreamer.h
lib/MC/MCAsmStreamer.cpp
lib/MC/MCParser/COFFAsmParser.cpp
lib/MC/MCStreamer.cpp
lib/MC/MCWinCOFFStreamer.cpp
test/MC/COFF/relocation-imgrel.s