1# REQUIRES: x86 2 3## Alignment of the copy relocated symbol is respected, even when .bss includes 4## other sections (COMMON). 5 6# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o 7# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux \ 8# RUN: %p/Inputs/relocation-copy-align-common.s -o %t2.o 9# RUN: ld.lld -shared %t2.o -soname=so -o %t.so 10# RUN: ld.lld %t.o %t.so -o %t3 11# RUN: llvm-readobj -S -r %t3 | FileCheck %s 12 13# CHECK: Section { 14# CHECK: Index: 15# CHECK: Name: .bss 16# CHECK-NEXT: Type: SHT_NOBITS 17# CHECK-NEXT: Flags [ 18# CHECK-NEXT: SHF_ALLOC 19# CHECK-NEXT: SHF_WRITE 20# CHECK-NEXT: ] 21# CHECK-NEXT: Address: 0x203360 22# CHECK-NEXT: Offset: 0x360 23# CHECK-NEXT: Size: 64 24# CHECK-NEXT: Link: 0 25# CHECK-NEXT: Info: 0 26# CHECK-NEXT: AddressAlignment: 32 27# CHECK-NEXT: EntrySize: 0 28# CHECK-NEXT: } 29 30# CHECK: Relocations [ 31# CHECK-NEXT: Section {{.*}} .rela.dyn { 32# CHECK-NEXT: 0x203380 R_X86_64_COPY foo 0x0 33# CHECK-NEXT: } 34# CHECK-NEXT: ] 35 36.global _start 37_start: 38.comm sym1,4,4 39movl $5, foo 40