aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86AsmBackend.cpp
diff options
context:
space:
mode:
authorWesley Peck <peckw@wesleypeck.com>2010-10-22 15:52:49 +0000
committerWesley Peck <peckw@wesleypeck.com>2010-10-22 15:52:49 +0000
commiteecb858ca86fa949c06f819d6127e2ac68d165c8 (patch)
tree26929dff56c468f9ed3a98f7e08394259d17f59f /lib/Target/X86/X86AsmBackend.cpp
parenta13d14a1290bc2c8b2e25a51ec4ae4e9bc8cd215 (diff)
Making the e_machine configurable by the target backend in ELFObjectWriter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117099 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86AsmBackend.cpp')
-rw-r--r--lib/Target/X86/X86AsmBackend.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/X86/X86AsmBackend.cpp b/lib/Target/X86/X86AsmBackend.cpp
index 83fca5141e..17db41a76b 100644
--- a/lib/Target/X86/X86AsmBackend.cpp
+++ b/lib/Target/X86/X86AsmBackend.cpp
@@ -20,6 +20,7 @@
#include "llvm/MC/MCSectionELF.h"
#include "llvm/MC/MCSectionMachO.h"
#include "llvm/MC/MachObjectWriter.h"
+#include "llvm/Support/ELF.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetRegistry.h"
@@ -228,7 +229,7 @@ public:
MCObjectWriter *createObjectWriter(raw_ostream &OS) const {
return new ELFObjectWriter(OS, /*Is64Bit=*/false,
- OSType,
+ OSType, ELF::EM_386,
/*IsLittleEndian=*/true,
/*HasRelocationAddend=*/false);
}
@@ -245,7 +246,7 @@ public:
MCObjectWriter *createObjectWriter(raw_ostream &OS) const {
return new ELFObjectWriter(OS, /*Is64Bit=*/true,
- OSType,
+ OSType, ELF::EM_X86_64,
/*IsLittleEndian=*/true,
/*HasRelocationAddend=*/true);
}