summaryrefslogtreecommitdiff
path: root/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2014-04-08 14:28:03 +0000
committerTom Stellard <thomas.stellard@amd.com>2014-04-08 14:28:03 +0000
commit89bdc4dd5541a9eee0b83e81e0bc0c924abc7d30 (patch)
tree6788d36dcd5680846ea050ef9302bb9f6d089915 /lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
parent16fbfb406f11a05ff2a745639a60237fb071b1a6 (diff)
downloadllvm-89bdc4dd5541a9eee0b83e81e0bc0c924abc7d30.tar.gz
llvm-89bdc4dd5541a9eee0b83e81e0bc0c924abc7d30.tar.bz2
llvm-89bdc4dd5541a9eee0b83e81e0bc0c924abc7d30.tar.xz
Merging r198744:
------------------------------------------------------------------------ r198744 | iain | 2014-01-08 05:22:54 -0500 (Wed, 08 Jan 2014) | 8 lines [patch] Adjust behavior of FDE cross-section relocs for targets that don't support abs-differences. Modern versions of OSX/Darwin's ld (ld64 > 97.17) have an optimisation present that allows the back end to omit relocations (and replace them with an absolute difference) for FDE some text section refs. This patch allows a backend to opt-in to this behaviour by setting "DwarfFDESymbolsUseAbsDiff". At present, this is only enabled for modern x86 OSX ports. test changes by David Fang. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@205768 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp')
-rw-r--r--lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp b/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
index 3861e1ce29..6a173fd309 100644
--- a/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
+++ b/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
@@ -65,6 +65,11 @@ X86MCAsmInfoDarwin::X86MCAsmInfoDarwin(const Triple &T) {
// Exceptions handling
ExceptionsType = ExceptionHandling::DwarfCFI;
+
+ // FIXME: this should not depend on the target OS version, but on the ld64
+ // version in use. From at least >= ld64-97.17 (Xcode 3.2.6) the abs-ified
+ // FDE relocs may be used.
+ DwarfFDESymbolsUseAbsDiff = T.isMacOSX() && !T.isMacOSXVersionLT(10, 6);
}
X86_64MCAsmInfoDarwin::X86_64MCAsmInfoDarwin(const Triple &Triple)