diff options
author | Nico Rieck <nico.rieck@gmail.com> | 2013-04-10 23:28:17 +0000 |
---|---|---|
committer | Nico Rieck <nico.rieck@gmail.com> | 2013-04-10 23:28:17 +0000 |
commit | 18d49acdab79d6f0966b47182b6c3a2ba3d9f80f (patch) | |
tree | 627374fd66e65ec88b6ba4f4cfd81c79cf6be35b /include/llvm/MC/MCWinCOFFObjectWriter.h | |
parent | bb5cbd86a4add5944c869836c507d419255d98dc (diff) | |
download | external_llvm-18d49acdab79d6f0966b47182b6c3a2ba3d9f80f.zip external_llvm-18d49acdab79d6f0966b47182b6c3a2ba3d9f80f.tar.gz external_llvm-18d49acdab79d6f0966b47182b6c3a2ba3d9f80f.tar.bz2 |
MC: Support COFF image-relative MCSymbolRefs
Add support for the COFF relocation types IMAGE_REL_I386_DIR32NB and
IMAGE_REL_AMD64_ADDR32NB for 32- and 64-bit respectively. These are
similar to normal 4-byte relocations except that they do not include
the base address of the image.
Image-relative relocations are used for debug information (32-bit) and
SEH unwind tables (64-bit).
A new MCSymbolRef variant called 'VK_COFF_IMGREL32' is introduced to
specify such relocations. For AT&T assembly, this variant can be accessed
using the symbol suffix '@imgrel'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179240 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCWinCOFFObjectWriter.h')
-rw-r--r-- | include/llvm/MC/MCWinCOFFObjectWriter.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm/MC/MCWinCOFFObjectWriter.h b/include/llvm/MC/MCWinCOFFObjectWriter.h index 11df574..f13e7d5 100644 --- a/include/llvm/MC/MCWinCOFFObjectWriter.h +++ b/include/llvm/MC/MCWinCOFFObjectWriter.h @@ -11,7 +11,9 @@ #define LLVM_MC_MCWINCOFFOBJECTWRITER_H namespace llvm { + class MCFixup; class MCObjectWriter; + class MCValue; class raw_ostream; class MCWinCOFFObjectTargetWriter { @@ -24,7 +26,9 @@ namespace llvm { virtual ~MCWinCOFFObjectTargetWriter() {} unsigned getMachine() const { return Machine; } - virtual unsigned getRelocType(unsigned FixupKind) const = 0; + virtual unsigned getRelocType(const MCValue &Target, + const MCFixup &Fixup, + bool IsCrossSection) const = 0; }; /// \brief Construct a new Win COFF writer instance. |