diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2015-01-31 19:27:28 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2015-01-31 19:27:28 +0000 |
| commit | ec304151b74f9254d7029ee4d197ce1f7cbe501a (patch) | |
| tree | 63e4ed55e4fbb581fd4731d44a327a7b3278e0a1 /lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp | |
| parent | 67c32a98315f785a9ec9d531c1f571a0196c7463 (diff) | |
Notes
Diffstat (limited to 'lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp')
| -rw-r--r-- | lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp b/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp index 719b761084f9..164b4192ae66 100644 --- a/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp +++ b/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp @@ -777,6 +777,19 @@ public: MachO::CPU_TYPE_X86_64, Subtype); } + bool doesSectionRequireSymbols(const MCSection &Section) const override { + // Temporary labels in the string literals sections require symbols. The + // issue is that the x86_64 relocation format does not allow symbol + + // offset, and so the linker does not have enough information to resolve the + // access to the appropriate atom unless an external relocation is used. For + // non-cstring sections, we expect the compiler to use a non-temporary label + // for anything that could have an addend pointing outside the symbol. + // + // See <rdar://problem/4765733>. + const MCSectionMachO &SMO = static_cast<const MCSectionMachO&>(Section); + return SMO.getType() == MachO::S_CSTRING_LITERALS; + } + /// \brief Generate the compact unwind encoding for the CFI instructions. uint32_t generateCompactUnwindEncoding( ArrayRef<MCCFIInstruction> Instrs) const override { |
