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".
Paths
| Differential D49821
[MC] Add support for the .rva assembler directive for COFF targets ClosedPublic Authored by mstorsjo on Jul 25 2018, 2:22 PM.
Details Summary 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".
Diff Detail Event TimelineThis revision is now accepted and ready to land.Jul 26 2018, 10:50 AM Closed by commit rL338063: [MC] Add support for the .rva assembler directive for COFF targets (authored by mstorsjo). · Explain WhyJul 26 2018, 1:11 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 157376 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
|
Quoting C++ expressions in an error message is not very user friend, I'd stick in -2147483648