[patch] Adjust behavior of FDE cross-section relocs for targets that don't support...
authorIain Sandoe <iain@codesourcery.com>
Wed, 8 Jan 2014 10:22:54 +0000 (10:22 +0000)
committerIain Sandoe <iain@codesourcery.com>
Wed, 8 Jan 2014 10:22:54 +0000 (10:22 +0000)
commit9c0a05c7af7f85ef931109e9e4a171cd9eec0a0f
treefc0a877cdbe71474150ee56157f1e497f4ed3301
parent4712264fb81fa48b15efcbcd8816437336f4d594
[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/trunk@198744 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCAsmInfo.h
lib/MC/MCAsmInfo.cpp
lib/MC/MCDwarf.cpp
lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
test/CodeGen/X86/pr10420.ll