brintos

brintos / llvm-project-archived public Read only

0
0
Text · 859 B · f9c6ed6 Raw
31 lines · plain
1# REQUIRES: x862 3## Disallow copy relocation if the symbol is defined as protected in a DSO.4 5# RUN: llvm-mc -triple x86_64-pc-linux -filetype=obj %p/Inputs/protected-data-access.s -o %t2.o6# RUN: ld.lld %t2.o -o %t2.so -shared7# RUN: llvm-mc -triple x86_64-pc-linux -filetype=obj %s -o %t.o8 9# RUN: not ld.lld %t.o %t2.so -o /dev/null 2>&1 | FileCheck --check-prefix=ERR %s10# ERR: error: cannot preempt symbol: foo11 12## Allow that if --ignore-data-address-equality is specified.13 14# RUN: ld.lld --ignore-data-address-equality %t.o %t2.so -o %t15# RUN: llvm-readobj --dyn-symbols --relocations %t | FileCheck %s16 17# CHECK: R_X86_64_COPY foo 0x018 19# CHECK:      Name: foo20# CHECK-NEXT: Value:21# CHECK-NEXT: Size: 822# CHECK-NEXT: Binding: Global23# CHECK-NEXT: Type: Object24# CHECK-NEXT: Other:25# CHECK-NEXT: Section: .bss.rel.ro26 27.global _start28_start:29  .quad foo30 31