1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -t -r --expand-relocs | FileCheck %s
3 .section foo, "aG", @progbits, f1, comdat
4 .section foo, "G", @progbits, f2, comdat
8 // Test that the relocation points to the first section foo.
10 // The first seciton foo has index 6
13 // CHECK-NEXT: Name: foo (28)
14 // CHECK-NEXT: Type: SHT_PROGBITS (0x1)
15 // CHECK-NEXT: Flags [ (0x202)
16 // CHECK-NEXT: SHF_ALLOC (0x2)
17 // CHECK-NEXT: SHF_GROUP (0x200)
19 // CHECK-NEXT: Address: 0x0
20 // CHECK-NEXT: Offset:
21 // CHECK-NEXT: Size: 0
22 // CHECK-NEXT: Link: 0
23 // CHECK-NEXT: Info: 0
24 // CHECK-NEXT: AddressAlignment: 1
25 // CHECK-NEXT: EntrySize: 0
29 // CHECK-NEXT: Name: foo (28)
30 // CHECK-NEXT: Type: SHT_PROGBITS (0x1)
31 // CHECK-NEXT: Flags [ (0x200)
32 // CHECK-NEXT: SHF_GROUP (0x200)
34 // CHECK-NEXT: Address: 0x0
35 // CHECK-NEXT: Offset:
36 // CHECK-NEXT: Size: 0
37 // CHECK-NEXT: Link: 0
38 // CHECK-NEXT: Info: 0
39 // CHECK-NEXT: AddressAlignment: 1
40 // CHECK-NEXT: EntrySize: 0
43 // The relocation points to symbol 6
44 // CHECK: Relocations [
45 // CHECK-NEXT: Section ({{.*}}) .relabar {
46 // CHECK-NEXT: Relocation {
47 // CHECK-NEXT: Offset: 0x0
48 // CHECK-NEXT: Type: R_X86_64_32 (10)
49 // CHECK-NEXT: Symbol: foo (6)
50 // CHECK-NEXT: Addend: 0x0
56 // The symbol 6 corresponds section 6
86 // CHECK: Section: foo (0x6)
91 // CHECK: Section: foo (0x8)