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
|
|
|
|
|
|
|
|
.text
|
|
|
|
.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: ]
|
2015-11-24 18:15:50 +08:00
|
|
|
// CHECK-NEXT: Address: 0x190
|
2015-10-20 05:00:02 +08:00
|
|
|
|
|
|
|
// CHECK: Relocations [
|
|
|
|
// CHECK-NEXT: Section ({{.*}}) .rela.dyn {
|
2015-11-24 18:15:50 +08:00
|
|
|
// CHECK-NEXT: 0x{{.*}} R_X86_64_RELATIVE - 0x192
|
2015-10-20 05:00:02 +08:00
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: ]
|