blob: 78f05d2eb96de55bcbead8e85710bb5b2efe3ef4 [file] [log] [blame]
Rafael Espindola69d1ca6a2015-12-10 22:53:241// REQUIRES: x86
2// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/relocation-copy-align.s -o %t2.o
4// RUN: ld.lld -shared %t2.o -o %t.so
5// RUN: ld.lld %t.o %t.so -o %t3
Fangrui Songb1599062019-05-01 05:49:016// RUN: llvm-readobj -S -r --expand-relocs %t3 | FileCheck %s
Rafael Espindola69d1ca6a2015-12-10 22:53:247
8.global _start
9_start:
10movl $5, x
11
12// CHECK: Name: .bss
13// CHECK-NEXT: Type: SHT_NOBITS
14// CHECK-NEXT: Flags [
15// CHECK-NEXT: SHF_ALLOC
16// CHECK-NEXT: SHF_WRITE
17// CHECK-NEXT: ]
18// CHECK-NEXT: Address:
19// CHECK-NEXT: Offset:
20// CHECK-NEXT: Size: 4
21// CHECK-NEXT: Link:
22// CHECK-NEXT: Info:
23// CHECK-NEXT: AddressAlignment: 4
24// CHECK-NEXT: EntrySize:
25
26// CHECK: Relocation {
27// CHECK-NEXT: Offset:
28// CHECK-NEXT: Type: R_X86_64_COPY
29// CHECK-NEXT: Symbol: x
30// CHECK-NEXT: Addend: 0x0
31// CHECK-NEXT: }