40 lines · plain
1# REQUIRES: x862 3## Alignment of the copy relocated symbol is respected, even when .bss includes4## other sections (COMMON).5 6# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o7# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux \8# RUN: %p/Inputs/relocation-copy-align-common.s -o %t2.o9# RUN: ld.lld -shared %t2.o -soname=so -o %t.so10# RUN: ld.lld %t.o %t.so -o %t311# RUN: llvm-readobj -S -r %t3 | FileCheck %s12 13# CHECK: Section {14# CHECK: Index:15# CHECK: Name: .bss16# CHECK-NEXT: Type: SHT_NOBITS17# CHECK-NEXT: Flags [18# CHECK-NEXT: SHF_ALLOC19# CHECK-NEXT: SHF_WRITE20# CHECK-NEXT: ]21# CHECK-NEXT: Address: 0x20336022# CHECK-NEXT: Offset: 0x36023# CHECK-NEXT: Size: 6424# CHECK-NEXT: Link: 025# CHECK-NEXT: Info: 026# CHECK-NEXT: AddressAlignment: 3227# CHECK-NEXT: EntrySize: 028# CHECK-NEXT: }29 30# CHECK: Relocations [31# CHECK-NEXT: Section {{.*}} .rela.dyn {32# CHECK-NEXT: 0x203380 R_X86_64_COPY foo 0x033# CHECK-NEXT: }34# CHECK-NEXT: ]35 36.global _start37_start:38.comm sym1,4,439movl $5, foo40