3 ## Disallow copy relocation if the symbol is defined as protected in a DSO.
5 # RUN: llvm-mc -triple x86_64-pc-linux -filetype=obj %p/Inputs/protected-data-access.s -o %t2.o
6 # RUN: ld.lld %t2.o -o %t2.so -shared
7 # RUN: llvm-mc -triple x86_64-pc-linux -filetype=obj %s -o %t.o
9 # RUN: not ld.lld %t.o %t2.so -o /dev/null 2>&1 | FileCheck --check-prefix=ERR %s
10 # ERR: error: cannot preempt symbol: foo
12 ## Allow that if --ignore-data-address-equality is specified.
14 # RUN: ld.lld --ignore-data-address-equality %t.o %t2.so -o %t
15 # RUN: llvm-readobj --dyn-symbols --relocations %t | FileCheck %s
17 # CHECK: R_X86_64_COPY foo 0x0
22 # CHECK-NEXT: Binding: Global
23 # CHECK-NEXT: Type: Object
25 # CHECK-NEXT: Section: .bss.rel.ro