2018-04-20 05:58:28 +08:00
|
|
|
// REQUIRES: x86
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
|
|
|
// RUN: ld.lld %t.o -o %t.so -shared
|
|
|
|
// RUN: llvm-readobj -s -section-data -t %t.so | FileCheck %s
|
|
|
|
|
|
|
|
// CHECK: Name: .bar
|
|
|
|
// CHECK-NEXT: Type: SHT_PROGBITS
|
|
|
|
// CHECK-NEXT: Flags [
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
// CHECK-NEXT: Address:
|
|
|
|
// CHECK-NEXT: Offset:
|
|
|
|
// CHECK-NEXT: Size: 16
|
|
|
|
// CHECK-NEXT: Link:
|
|
|
|
// CHECK-NEXT: Info:
|
|
|
|
// CHECK-NEXT: AddressAlignment:
|
|
|
|
// CHECK-NEXT: EntrySize:
|
|
|
|
// CHECK-NEXT: SectionData (
|
2018-06-27 06:13:32 +08:00
|
|
|
// CHECK-NEXT: 0000: 10020000 00000000 18020000 00000000 |
|
2018-04-20 05:58:28 +08:00
|
|
|
// CHECK-NEXT: )
|
|
|
|
|
|
|
|
// CHECK: Name: foo
|
2018-06-27 06:13:32 +08:00
|
|
|
// CHECK-NEXT: Value: 0x210
|
2018-04-20 05:58:28 +08:00
|
|
|
|
|
|
|
.section .foo,"aM",@progbits,4
|
|
|
|
.align 4
|
|
|
|
.global foo
|
|
|
|
.hidden foo
|
|
|
|
foo:
|
|
|
|
.long 0x42
|
|
|
|
|
|
|
|
.section .bar
|
|
|
|
.quad foo
|
|
|
|
.quad foo + 8
|