aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-02-24 21:04:00 +0000
committerDevang Patel <dpatel@apple.com>2011-02-24 21:04:00 +0000
commitf410608271b6318bfc9e26c0d199f185d5a89ccb (patch)
tree657e0f50bc3d75837e1154ebdd71aa190d7acc2b /lib/Target/X86
parent8c20ec54d98176d31f310e4684d1d7f2ea0639bc (diff)
downloadexternal_llvm-f410608271b6318bfc9e26c0d199f185d5a89ccb.zip
external_llvm-f410608271b6318bfc9e26c0d199f185d5a89ccb.tar.gz
external_llvm-f410608271b6318bfc9e26c0d199f185d5a89ccb.tar.bz2
Enable DebugInfo support for COFF object files.
Patch by Nathan Jeffords! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126425 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86')
-rw-r--r--lib/Target/X86/X86AsmBackend.cpp4
-rw-r--r--lib/Target/X86/X86FixupKinds.h2
-rw-r--r--lib/Target/X86/X86MCAsmInfo.cpp3
3 files changed, 8 insertions, 1 deletions
diff --git a/lib/Target/X86/X86AsmBackend.cpp b/lib/Target/X86/X86AsmBackend.cpp
index da5f5b1..6a0b059 100644
--- a/lib/Target/X86/X86AsmBackend.cpp
+++ b/lib/Target/X86/X86AsmBackend.cpp
@@ -40,6 +40,7 @@ static unsigned getFixupKindLog2Size(unsigned Kind) {
case X86::reloc_riprel_4byte_movq_load:
case X86::reloc_signed_4byte:
case X86::reloc_global_offset_table:
+ case X86::reloc_coff_secrel32:
case FK_Data_4: return 2;
case FK_PCRel_8:
case FK_Data_8: return 3;
@@ -69,7 +70,8 @@ public:
{ "reloc_riprel_4byte", 0, 4 * 8, MCFixupKindInfo::FKF_IsPCRel },
{ "reloc_riprel_4byte_movq_load", 0, 4 * 8, MCFixupKindInfo::FKF_IsPCRel},
{ "reloc_signed_4byte", 0, 4 * 8, 0},
- { "reloc_global_offset_table", 0, 4 * 8, 0}
+ { "reloc_global_offset_table", 0, 4 * 8, 0},
+ { "reloc_coff_secrel32", 0, 4 * 8, 0}
};
if (Kind < FirstTargetFixupKind)
diff --git a/lib/Target/X86/X86FixupKinds.h b/lib/Target/X86/X86FixupKinds.h
index 17d242a..d6cb39a 100644
--- a/lib/Target/X86/X86FixupKinds.h
+++ b/lib/Target/X86/X86FixupKinds.h
@@ -23,6 +23,8 @@ enum Fixups {
reloc_global_offset_table, // 32-bit, relative to the start
// of the instruction. Used only
// for _GLOBAL_OFFSET_TABLE_.
+ reloc_coff_secrel32, // PE-COFF section relative 32
+ // (only valid for win32 COFF)
// Marker
LastTargetFixupKind,
NumTargetFixupKinds = LastTargetFixupKind - FirstTargetFixupKind
diff --git a/lib/Target/X86/X86MCAsmInfo.cpp b/lib/Target/X86/X86MCAsmInfo.cpp
index 6686214..75bc1ed 100644
--- a/lib/Target/X86/X86MCAsmInfo.cpp
+++ b/lib/Target/X86/X86MCAsmInfo.cpp
@@ -113,4 +113,7 @@ X86MCAsmInfoCOFF::X86MCAsmInfoCOFF(const Triple &Triple) {
AssemblerDialect = AsmWriterFlavor;
TextAlignFillValue = 0x90;
+
+ // Debug Information
+ SupportsDebugInformation = true;
}