2015-10-20 05:00:02 +08:00
|
|
|
// REQUIRES: x86
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
2015-11-18 14:11:01 +08:00
|
|
|
// RUN: ld.lld %t.o -o %t.so -shared
|
2015-10-20 05:00:02 +08:00
|
|
|
// RUN: llvm-readobj -r -s %t.so | FileCheck %s
|
|
|
|
|
|
|
|
.section foo,"aM",@progbits,4
|
|
|
|
.long 42
|
|
|
|
.long 42
|
|
|
|
|
2016-05-05 04:25:19 +08:00
|
|
|
.data
|
2015-10-20 05:00:02 +08:00
|
|
|
.quad foo + 6
|
|
|
|
|
|
|
|
|
2015-11-04 05:35:14 +08:00
|
|
|
// CHECK: Name: foo
|
2015-10-20 05:00:02 +08:00
|
|
|
// CHECK-NEXT: Type: SHT_PROGBITS
|
|
|
|
// CHECK-NEXT: Flags [
|
|
|
|
// CHECK-NEXT: SHF_ALLOC
|
|
|
|
// CHECK-NEXT: SHF_MERGE
|
|
|
|
// CHECK-NEXT: ]
|
2018-06-27 06:13:32 +08:00
|
|
|
// CHECK-NEXT: Address: 0x228
|
2015-10-20 05:00:02 +08:00
|
|
|
|
|
|
|
// CHECK: Relocations [
|
|
|
|
// CHECK-NEXT: Section ({{.*}}) .rela.dyn {
|
2018-06-27 06:13:32 +08:00
|
|
|
// CHECK-NEXT: 0x{{.*}} R_X86_64_RELATIVE - 0x22A
|
2015-10-20 05:00:02 +08:00
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: ]
|