diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-12-24 14:47:52 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-12-24 14:47:52 +0000 |
commit | ce618af3e880ae0ec0ddd81aca8ed5bbd4096ae4 (patch) | |
tree | 530df93d0d95848206ed0772a92dd8aed3d18a26 /lib/MC | |
parent | 7782102c70fdfd48776f05099eb67dd268cfc222 (diff) | |
download | external_llvm-ce618af3e880ae0ec0ddd81aca8ed5bbd4096ae4.zip external_llvm-ce618af3e880ae0ec0ddd81aca8ed5bbd4096ae4.tar.gz external_llvm-ce618af3e880ae0ec0ddd81aca8ed5bbd4096ae4.tar.bz2 |
Section relative fixups are a coff concept, not a x86 one. Replace the
x86 specific reloc_coff_secrel32 with a generic FK_SecRel_4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147252 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r-- | lib/MC/MCAsmBackend.cpp | 6 | ||||
-rw-r--r-- | lib/MC/WinCOFFStreamer.cpp | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/MC/MCAsmBackend.cpp b/lib/MC/MCAsmBackend.cpp index 936ed55..51c3977 100644 --- a/lib/MC/MCAsmBackend.cpp +++ b/lib/MC/MCAsmBackend.cpp @@ -32,7 +32,11 @@ MCAsmBackend::getFixupKindInfo(MCFixupKind Kind) const { { "FK_GPRel_1", 0, 8, 0 }, { "FK_GPRel_2", 0, 16, 0 }, { "FK_GPRel_4", 0, 32, 0 }, - { "FK_GPRel_8", 0, 64, 0 } + { "FK_GPRel_8", 0, 64, 0 }, + { "FK_SecRel_1", 0, 8, 0 }, + { "FK_SecRel_2", 0, 16, 0 }, + { "FK_SecRel_4", 0, 32, 0 }, + { "FK_SecRel_8", 0, 64, 0 } }; assert((size_t)Kind <= sizeof(Builtins) / sizeof(Builtins[0]) && diff --git a/lib/MC/WinCOFFStreamer.cpp b/lib/MC/WinCOFFStreamer.cpp index 3678a58..f2fecae 100644 --- a/lib/MC/WinCOFFStreamer.cpp +++ b/lib/MC/WinCOFFStreamer.cpp @@ -33,8 +33,6 @@ #include "llvm/Support/TargetRegistry.h" #include "llvm/Support/raw_ostream.h" -#include "../Target/X86/MCTargetDesc/X86FixupKinds.h" - using namespace llvm; namespace { @@ -303,7 +301,7 @@ void WinCOFFStreamer::EmitCOFFSecRel32(MCSymbol const *Symbol) DF->addFixup(MCFixup::Create(DF->getContents().size(), MCSymbolRefExpr::Create (Symbol, getContext ()), - (MCFixupKind)X86::reloc_coff_secrel32)); + FK_SecRel_4)); DF->getContents().resize(DF->getContents().size() + 4, 0); } |