x86_64 now uses the correct ELF e_machine type

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72986 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bruno Cardoso Lopes 2009-06-06 04:29:16 +00:00
parent 1762c1439e
commit cf0a577033
3 changed files with 5 additions and 3 deletions

View File

@ -14,5 +14,6 @@
#include "X86ELFWriterInfo.h"
using namespace llvm;
X86ELFWriterInfo::X86ELFWriterInfo() : TargetELFWriterInfo(EM_386) {}
X86ELFWriterInfo::X86ELFWriterInfo(bool is64Bit) :
TargetELFWriterInfo(is64Bit ? EM_X86_64 : EM_386) {}
X86ELFWriterInfo::~X86ELFWriterInfo() {}

View File

@ -20,7 +20,7 @@ namespace llvm {
class X86ELFWriterInfo : public TargetELFWriterInfo {
public:
X86ELFWriterInfo();
X86ELFWriterInfo(bool is64Bit);
virtual ~X86ELFWriterInfo();
};

View File

@ -133,7 +133,8 @@ X86TargetMachine::X86TargetMachine(const Module &M, const std::string &FS,
DataLayout(Subtarget.getDataLayout()),
FrameInfo(TargetFrameInfo::StackGrowsDown,
Subtarget.getStackAlignment(), Subtarget.is64Bit() ? -8 : -4),
InstrInfo(*this), JITInfo(*this), TLInfo(*this) {
InstrInfo(*this), JITInfo(*this), TLInfo(*this),
ELFWriterInfo(Subtarget.is64Bit()) {
DefRelocModel = getRelocationModel();
// FIXME: Correctly select PIC model for Win64 stuff
if (getRelocationModel() == Reloc::Default) {