// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S --symbols -r --expand-relocs - | FileCheck %s
.section foo, "aG", @progbits, f1, comdat
.section foo, "G", @progbits, f2, comdat
.section bar
.long foo
// Test that the relocation points to the first section foo.
// The first seciton foo has index 6
// CHECK: Section {
// CHECK: Index: 4
// CHECK-NEXT: Name: foo
// CHECK-NEXT: Type:
// CHECK-NEXT: Flags
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset:
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 1
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: }
// CHECK: Section {
// CHECK: Index: 6
// CHECK-NEXT: Name: foo
// CHECK-NEXT: Type:
// CHECK-NEXT: Flags
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset:
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 1
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: }
// The relocation points to symbol 3
// CHECK: Relocations
// Symbol 3 is section 6
// CHECK: Symbols