• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Test that R_390_PC32 and R_390_PC64 relocations can be generated.
2// RUN: llvm-mc -triple s390x-linux-gnu -filetype=obj %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
3
4// Test that RuntimeDyld can fix up such relocations.
5// RUN: llvm-mc -triple s390x-linux-gnu  -filetype=obj %s -o %T/test-s390x-cfi-relo-pc64.o
6// RUN: llc -mtriple=s390x-linux-gnu -filetype=obj %S/Inputs/rtdyld-globals.ll -o %T/test-s390x-rtdyld-globals.o
7// RUN: llvm-rtdyld -triple=s390x-linux-gnu -verify %T/test-s390x-cfi-relo-pc64.o %T/test-s390x-rtdyld-globals.o
8
9f1:
10    .cfi_startproc
11    .cfi_personality 0x9c, foo // DW_EH_PE_indirect|DW_EH_PE_pcrel|DW_EH_PE_sdata8 (0x9c)
12    lr %r0, %r0
13    .cfi_endproc
14
15// CHECK:        Section {
16// CHECK:          Index:
17// CHECK:          Name: .rela.eh_frame
18// CHECK-NEXT:     Type: SHT_RELA
19// CHECK-NEXT:     Flags [
20// CHECK-NEXT:     ]
21// CHECK-NEXT:     Address: 0x0
22// CHECK-NEXT:     Offset:
23// CHECK-NEXT:     Size: 48
24// CHECK-NEXT:     Link:
25// CHECK-NEXT:     Info:
26// CHECK-NEXT:     AddressAlignment: 8
27// CHECK-NEXT:     EntrySize: 24
28// CHECK-NEXT:     Relocations [
29// CHECK-NEXT:       0x12 R_390_PC64 foo 0x0
30// CHECK-NEXT:       0x28 R_390_PC32 .text 0x0
31// CHECK-NEXT:     ]
32// CHECK:        }
33