2015-04-30 14:21:49 +00:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -t -sd | FileCheck %s
|
2010-11-11 18:13:52 +00:00
|
|
|
|
2015-04-30 14:21:49 +00:00
|
|
|
// Test that we produce the group sections and that they are before the members
|
2010-11-11 18:13:52 +00:00
|
|
|
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK: Section {
|
2015-04-30 14:21:49 +00:00
|
|
|
// CHECK: Index: 5
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK-NEXT: Name: .group
|
|
|
|
// CHECK-NEXT: Type: SHT_GROUP
|
|
|
|
// CHECK-NEXT: Flags [
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
// CHECK-NEXT: Address: 0x0
|
2015-04-30 13:57:06 +00:00
|
|
|
// CHECK-NEXT: Offset:
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK-NEXT: Size: 12
|
2015-04-29 20:25:24 +00:00
|
|
|
// CHECK-NEXT: Link:
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK-NEXT: Info: 1
|
|
|
|
// CHECK-NEXT: AddressAlignment: 4
|
|
|
|
// CHECK-NEXT: EntrySize: 4
|
2015-04-30 14:21:49 +00:00
|
|
|
// CHECK-NEXT: SectionData (
|
|
|
|
// CHECK-NEXT: 0000: 01000000 06000000 07000000
|
|
|
|
// CHECK-NEXT: )
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK-NEXT: }
|
2015-04-30 14:21:49 +00:00
|
|
|
// CHECK: Section {
|
|
|
|
// CHECK: Index: 8
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK-NEXT: Name: .group
|
|
|
|
// CHECK-NEXT: Type: SHT_GROUP
|
|
|
|
// CHECK-NEXT: Flags [
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
// CHECK-NEXT: Address: 0x0
|
2015-04-30 13:57:06 +00:00
|
|
|
// CHECK-NEXT: Offset:
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK-NEXT: Size: 8
|
2015-04-29 20:25:24 +00:00
|
|
|
// CHECK-NEXT: Link:
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK-NEXT: Info: 2
|
|
|
|
// CHECK-NEXT: AddressAlignment: 4
|
|
|
|
// CHECK-NEXT: EntrySize: 4
|
2015-04-30 14:21:49 +00:00
|
|
|
// CHECK-NEXT: SectionData (
|
|
|
|
// CHECK-NEXT: 0000: 01000000 09000000
|
|
|
|
// CHECK-NEXT: )
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK-NEXT: }
|
2015-04-30 14:21:49 +00:00
|
|
|
// CHECK: Section {
|
|
|
|
// CHECK: Index: 10
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK-NEXT: Name: .group
|
|
|
|
// CHECK-NEXT: Type: SHT_GROUP
|
|
|
|
// CHECK-NEXT: Flags [
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
// CHECK-NEXT: Address: 0x0
|
2015-04-30 13:57:06 +00:00
|
|
|
// CHECK-NEXT: Offset:
|
2013-07-10 20:58:17 +00:00
|
|
|
// CHECK-NEXT: Size: 12
|
2015-04-29 20:25:24 +00:00
|
|
|
// CHECK-NEXT: Link:
|
2014-10-17 01:48:58 +00:00
|
|
|
// CHECK-NEXT: Info: 10
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK-NEXT: AddressAlignment: 4
|
|
|
|
// CHECK-NEXT: EntrySize: 4
|
2015-04-30 14:21:49 +00:00
|
|
|
// CHECK-NEXT: SectionData (
|
|
|
|
// CHECK-NEXT: 0000: 01000000 0B000000 0C000000
|
|
|
|
// CHECK-NEXT: )
|
2013-04-12 04:06:46 +00:00
|
|
|
// 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
|
2015-04-29 20:25:24 +00:00
|
|
|
// CHECK-NEXT: Section: .foo
|
2013-04-12 04:06:46 +00:00
|
|
|
// 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
|
2015-04-30 14:21:49 +00:00
|
|
|
// CHECK-NEXT: Section: .group (0x8)
|
2013-04-12 04:06:46 +00:00
|
|
|
// 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
|