diff options
author | Iain Sandoe <iain@codesourcery.com> | 2014-01-08 10:22:54 +0000 |
---|---|---|
committer | Iain Sandoe <iain@codesourcery.com> | 2014-01-08 10:22:54 +0000 |
commit | 9c0a05c7af7f85ef931109e9e4a171cd9eec0a0f (patch) | |
tree | fc0a877cdbe71474150ee56157f1e497f4ed3301 /include | |
parent | 4712264fb81fa48b15efcbcd8816437336f4d594 (diff) | |
download | llvm-9c0a05c7af7f85ef931109e9e4a171cd9eec0a0f.tar.gz llvm-9c0a05c7af7f85ef931109e9e4a171cd9eec0a0f.tar.bz2 llvm-9c0a05c7af7f85ef931109e9e4a171cd9eec0a0f.tar.xz |
[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
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/MC/MCAsmInfo.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/MC/MCAsmInfo.h b/include/llvm/MC/MCAsmInfo.h index a46c300bf2..0d1052be6d 100644 --- a/include/llvm/MC/MCAsmInfo.h +++ b/include/llvm/MC/MCAsmInfo.h @@ -292,6 +292,10 @@ namespace llvm { /// uses relocations for references to other .debug_* sections. bool DwarfUsesRelocationsAcrossSections; + /// DwarfFDESymbolsUseAbsDiff - true if DWARF FDE symbol reference + /// relocations should be replaced by an absolute difference. + bool DwarfFDESymbolsUseAbsDiff; + /// DwarfRegNumForCFI - True if dwarf register numbers are printed /// instead of symbolic register names in .cfi_* directives. bool DwarfRegNumForCFI; // Defaults to false; @@ -513,6 +517,9 @@ namespace llvm { bool doesDwarfUseRelocationsAcrossSections() const { return DwarfUsesRelocationsAcrossSections; } + bool doDwarfFDESymbolsUseAbsDiff() const { + return DwarfFDESymbolsUseAbsDiff; + } bool useDwarfRegNumForCFI() const { return DwarfRegNumForCFI; } |