2014-10-17 09:48:58 +08:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t -r --expand-relocs | FileCheck %s
|
|
|
|
|
|
|
|
// Test that we can forward reference a section.
|
|
|
|
|
|
|
|
mov .rodata, %rsi
|
|
|
|
.section .rodata
|
|
|
|
|
|
|
|
// CHECK:Relocations [
|
2015-04-15 23:59:37 +08:00
|
|
|
// CHECK: Section {{.*}} .rela.text {
|
2014-10-17 09:48:58 +08:00
|
|
|
// CHECK: Relocation {
|
|
|
|
// CHECK: Offset: 0x4
|
|
|
|
// CHECK: Type: R_X86_64_32S (11)
|
|
|
|
// CHECK: Symbol: .rodata
|
|
|
|
// CHECK: Addend: 0x0
|
|
|
|
// CHECK: }
|
|
|
|
// CHECK: }
|
|
|
|
// CHECK:]
|
|
|
|
|
|
|
|
// There is only one .rodata symbol
|
|
|
|
|
|
|
|
// CHECK:Symbols [
|
2015-06-03 13:14:22 +08:00
|
|
|
// CHECK: Type: Section (0x3)
|
|
|
|
// CHECK: Section: .rodata
|
|
|
|
// CHECK-NOT: Section: .rodata
|