2013-04-12 04:06:46 +00:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -t | FileCheck %s
|
2010-11-11 18:13:52 +00:00
|
|
|
|
2010-11-14 04:17:37 +00:00
|
|
|
// Test that we produce the group sections and that they are a the beginning
|
2010-11-11 18:13:52 +00:00
|
|
|
// of the file.
|
|
|
|
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK: Section {
|
|
|
|
// CHECK: Index: 1
|
|
|
|
// CHECK-NEXT: Name: .group
|
|
|
|
// CHECK-NEXT: Type: SHT_GROUP
|
|
|
|
// CHECK-NEXT: Flags [
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
// CHECK-NEXT: Address: 0x0
|
|
|
|
// CHECK-NEXT: Offset: 0x40
|
|
|
|
// CHECK-NEXT: Size: 12
|
|
|
|
// CHECK-NEXT: Link: 13
|
|
|
|
// CHECK-NEXT: Info: 1
|
|
|
|
// CHECK-NEXT: AddressAlignment: 4
|
|
|
|
// CHECK-NEXT: EntrySize: 4
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: Section {
|
|
|
|
// CHECK-NEXT: Index: 2
|
|
|
|
// CHECK-NEXT: Name: .group
|
|
|
|
// CHECK-NEXT: Type: SHT_GROUP
|
|
|
|
// CHECK-NEXT: Flags [
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
// CHECK-NEXT: Address: 0x0
|
|
|
|
// CHECK-NEXT: Offset: 0x4C
|
|
|
|
// CHECK-NEXT: Size: 8
|
|
|
|
// CHECK-NEXT: Link: 13
|
|
|
|
// CHECK-NEXT: Info: 2
|
|
|
|
// CHECK-NEXT: AddressAlignment: 4
|
|
|
|
// CHECK-NEXT: EntrySize: 4
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: Section {
|
|
|
|
// CHECK-NEXT: Index: 3
|
|
|
|
// CHECK-NEXT: Name: .group
|
|
|
|
// CHECK-NEXT: Type: SHT_GROUP
|
|
|
|
// CHECK-NEXT: Flags [
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
// CHECK-NEXT: Address: 0x0
|
|
|
|
// CHECK-NEXT: Offset: 0x54
|
2013-07-10 20:58:17 +00:00
|
|
|
// CHECK-NEXT: Size: 12
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK-NEXT: Link: 13
|
|
|
|
// CHECK-NEXT: Info: 13
|
|
|
|
// CHECK-NEXT: AddressAlignment: 4
|
|
|
|
// CHECK-NEXT: EntrySize: 4
|
|
|
|
// CHECK-NEXT: }
|
2010-11-14 04:17:37 +00:00
|
|
|
|
|
|
|
// Test that g1 and g2 are local, but g3 is an undefined global.
|
|
|
|
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK: Symbol {
|
2014-04-30 16:25:02 +00:00
|
|
|
// CHECK: Name: g1
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK-NEXT: Value: 0x0
|
|
|
|
// CHECK-NEXT: Size: 0
|
|
|
|
// CHECK-NEXT: Binding: Local
|
|
|
|
// CHECK-NEXT: Type: None
|
|
|
|
// CHECK-NEXT: Other: 0
|
|
|
|
// CHECK-NEXT: Section: .foo (0x7)
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: Symbol {
|
2014-04-30 16:25:02 +00:00
|
|
|
// CHECK-NEXT: Name: g2
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK-NEXT: Value: 0x0
|
|
|
|
// CHECK-NEXT: Size: 0
|
|
|
|
// CHECK-NEXT: Binding: Local
|
|
|
|
// CHECK-NEXT: Type: None
|
|
|
|
// CHECK-NEXT: Other: 0
|
|
|
|
// CHECK-NEXT: Section: .group (0x2)
|
|
|
|
// CHECK-NEXT: }
|
2010-11-14 04:17:37 +00:00
|
|
|
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK: Symbol {
|
2014-04-30 16:25:02 +00:00
|
|
|
// CHECK: Name: g3
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK-NEXT: Value: 0x0
|
|
|
|
// CHECK-NEXT: Size: 0
|
|
|
|
// CHECK-NEXT: Binding: Global
|
|
|
|
// CHECK-NEXT: Type: None
|
|
|
|
// CHECK-NEXT: Other: 0
|
2014-03-24 05:00:34 +00:00
|
|
|
// CHECK-NEXT: Section: Undefined (0x0)
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK-NEXT: }
|
2010-11-14 04:17:37 +00:00
|
|
|
|
2010-11-11 18:13:52 +00:00
|
|
|
|
|
|
|
.section .foo,"axG",@progbits,g1,comdat
|
|
|
|
g1:
|
|
|
|
nop
|
|
|
|
|
2013-09-15 19:24:16 +00:00
|
|
|
.section .bar,"ax?",@progbits
|
2010-11-11 18:13:52 +00:00
|
|
|
nop
|
|
|
|
|
|
|
|
.section .zed,"axG",@progbits,g2,comdat
|
|
|
|
nop
|
2010-11-14 04:17:37 +00:00
|
|
|
|
|
|
|
.section .baz,"axG",@progbits,g3,comdat
|
|
|
|
.long g3
|