• 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: rm -rf %t && mkdir -p %t
6// RUN: llvm-mc -triple s390x-linux-gnu  -filetype=obj %s -o %t/test-s390x-cfi-relo-pc64.o
7// RUN: llc -mtriple=s390x-linux-gnu -filetype=obj %S/Inputs/rtdyld-globals.ll -o %t/test-s390x-rtdyld-globals.o
8// RUN: llvm-rtdyld -triple=s390x-linux-gnu -verify %t/test-s390x-cfi-relo-pc64.o %t/test-s390x-rtdyld-globals.o
9
10f1:
11    .cfi_startproc
12    .cfi_personality 0x9c, foo // DW_EH_PE_indirect|DW_EH_PE_pcrel|DW_EH_PE_sdata8 (0x9c)
13    lr %r0, %r0
14    .cfi_endproc
15
16// CHECK:        Section {
17// CHECK:          Index:
18// CHECK:          Name: .rela.eh_frame
19// CHECK-NEXT:     Type: SHT_RELA
20// CHECK-NEXT:     Flags [
21// CHECK-NEXT:     ]
22// CHECK-NEXT:     Address: 0x0
23// CHECK-NEXT:     Offset:
24// CHECK-NEXT:     Size: 48
25// CHECK-NEXT:     Link:
26// CHECK-NEXT:     Info:
27// CHECK-NEXT:     AddressAlignment: 8
28// CHECK-NEXT:     EntrySize: 24
29// CHECK-NEXT:     Relocations [
30// CHECK-NEXT:       0x12 R_390_PC64 foo 0x0
31// CHECK-NEXT:       0x28 R_390_PC32 .text 0x0
32// CHECK-NEXT:     ]
33// CHECK:        }
34