llvm.org GIT mirror llvm / 7f15475
Merging r213665: ------------------------------------------------------------------------ r213665 | tnorthover | 2014-07-22 08:47:09 -0700 (Tue, 22 Jul 2014) | 11 lines X86: drop relocations on __eh_frame sections globally. Without this, we produce non-extern relocations when targeting older OS X versions that ld64 can't cope with in the particular context of __eh_frame sections (who'd want generic relocation-processing anyway?). This means that an updated linker (ld64 from Xcode 3.2.6 or later) may be needed when targeting such platforms with a modern version of LLVM, but this is probably the case anyway and a reasonable requirement. PR20212, rdar://problem/17544795 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@214689 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 5 years ago
2 changed file(s) with 7 addition(s) and 22 deletion(s). Raw diff Collapse all Expand all
7171 if (T.isMacOSX() && T.isMacOSXVersionLT(10, 6))
7272 HasWeakDefCanBeHiddenDirective = false;
7373
74 // FIXME: this should not depend on the target OS version, but on the ld64
75 // version in use. From at least >= ld64-97.17 (Xcode 3.2.6) the abs-ified
76 // FDE relocs may be used. We also use them for the ios simulator.
77 DwarfFDESymbolsUseAbsDiff = (T.isMacOSX() && !T.isMacOSXVersionLT(10, 6))
78 || T.isiOS();
74 // Assume ld64 is new enough that the abs-ified FDE relocs may be used
75 // (actually, must, since otherwise the non-extern relocations we produce
76 // overwhelm ld64's tiny little mind and it fails).
77 DwarfFDESymbolsUseAbsDiff = true;
7978
8079 UseIntegratedAssembler = true;
8180 }
0 // RUN: llvm-mc < %s -triple=x86_64-apple-macosx10.7 -filetype=obj | llvm-readobj -r | FileCheck %s
11 // RUN: llvm-mc < %s -triple=x86_64-apple-macosx10.6 -filetype=obj | llvm-readobj -r | FileCheck %s
22 // RUN: llvm-mc < %s -triple=x86_64-apple-ios7.0.0 -filetype=obj | llvm-readobj -r | FileCheck %s
3 // RUN: llvm-mc < %s -triple=x86_64-apple-macosx10.5 -filetype=obj | llvm-readobj -r | FileCheck --check-prefix=OLD64 %s
3 // RUN: llvm-mc < %s -triple=x86_64-apple-macosx10.5 -filetype=obj | llvm-readobj -r | FileCheck %s
44 // RUN: llvm-mc < %s -triple=i686-apple-macosx10.6 -filetype=obj | llvm-readobj -r | FileCheck %s
5 // RUN: llvm-mc < %s -triple=i686-apple-macosx10.5 -filetype=obj | llvm-readobj -r | FileCheck --check-prefix=OLD32 %s
6 // RUN: llvm-mc < %s -triple=i686-apple-macosx10.4 -filetype=obj | llvm-readobj -r | FileCheck --check-prefix=OLD32 %s
5 // RUN: llvm-mc < %s -triple=i686-apple-macosx10.5 -filetype=obj | llvm-readobj -r | FileCheck %s
6 // RUN: llvm-mc < %s -triple=i686-apple-macosx10.4 -filetype=obj | llvm-readobj -r | FileCheck %s
77
88 .globl _bar
99 .align 4, 0x90
1313
1414 // CHECK: Relocations [
1515 // CHECK-NEXT: ]
16
17 // OLD32: Relocations [
18 // OLD32-NEXT: Section __eh_frame {
19 // OLD32-NEXT: 0x20 0 2 n/a GENERIC_RELOC_LOCAL_SECTDIFF 1 0x0
20 // OLD32-NEXT: 0x0 0 2 n/a GENERIC_RELOC_PAIR 1 0x20
21 // OLD32-NEXT: }
22 // OLD32-NEXT: ]
23
24 // OLD64: Relocations [
25 // OLD64-NEXT: Section __eh_frame {
26 // OLD64-NEXT: 0x20 0 3 0 X86_64_RELOC_SUBTRACTOR 0
27 // OLD64-NEXT: 0x20 0 3 1 X86_64_RELOC_UNSIGNED 0 _bar
28 // OLD64-NEXT: }
29 // OLD64-NEXT: ]