3 ## If for some bizarre reason the input file defines its own ___dso_handle, we
4 ## should raise an error. At least, we've implemented this behavior if the
5 ## conflicting symbol is a global. A local symbol of the same name will still
6 ## take priority in our implementation, unlike in ld64. But that's a pretty
7 ## far-out edge case that should be safe to ignore.
9 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o
10 # RUN: not %lld -dylib %t.o -o /dev/null 2>&1 | FileCheck %s -DFILE=%t.o
11 # CHECK: error: duplicate symbol: ___dso_handle
12 # CHECK-NEXT: >>> defined in [[FILE]]
13 # CHECK-NEXT: >>> defined in <internal>
15 .globl _main, ___dso_handle
18 leaq ___dso_handle
(%rip
), %rdx