From cbba0aba162fafaf25cbc0f6cccaf88012cb0728 Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Mon, 25 Apr 2016 22:36:07 +0000 Subject: ARM: put correct symbol index on indirect pointers in __thread_ptr. Otherwise the linker has no idea what should be resolved. llvm-svn: 267488 --- llvm/lib/MC/MachObjectWriter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/MC/MachObjectWriter.cpp') diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp index f33b866e6a5..e39271949d9 100644 --- a/llvm/lib/MC/MachObjectWriter.cpp +++ b/llvm/lib/MC/MachObjectWriter.cpp @@ -471,7 +471,8 @@ void MachObjectWriter::bindIndirectSymbols(MCAssembler &Asm) { ie = Asm.indirect_symbol_end(); it != ie; ++it, ++IndirectIndex) { const MCSectionMachO &Section = cast(*it->Section); - if (Section.getType() != MachO::S_NON_LAZY_SYMBOL_POINTERS) + if (Section.getType() != MachO::S_NON_LAZY_SYMBOL_POINTERS && + Section.getType() != MachO::S_THREAD_LOCAL_VARIABLE_POINTERS) continue; // Initialize the section indirect symbol base, if necessary. -- cgit v1.2.3