diff options
| -rw-r--r-- | llvm/lib/MC/MachObjectWriter.cpp | 3 | ||||
| -rw-r--r-- | llvm/test/MC/ARM/tls-directives.s | 6 |
2 files changed, 7 insertions, 2 deletions
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<MCSectionMachO>(*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. diff --git a/llvm/test/MC/ARM/tls-directives.s b/llvm/test/MC/ARM/tls-directives.s index c0e9f6cc142..69a02689289 100644 --- a/llvm/test/MC/ARM/tls-directives.s +++ b/llvm/test/MC/ARM/tls-directives.s @@ -1,5 +1,9 @@ @ RUN: llvm-mc -triple thumbv7-apple-ios -filetype=obj -o %t %s -@ RUN: llvm-objdump -p %t | FileCheck %s +@ RUN: llvm-objdump -macho -p -indirect-symbols %t | FileCheck %s + +@ CHECK: Indirect symbols for (__DATA,__thread_ptr) +@ CHECK: 0x0000001c 5 _a + @ CHECK: sectname __thread_data @ CHECK: segname __DATA |

