File: ppc32-gnu-ifunc.s

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (47 lines) | stat: -rw-r--r-- 1,370 bytes parent folder | download | duplicates (21)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# REQUIRES: ppc
# RUN: llvm-mc -filetype=obj -triple=powerpc %s -o %t.o
# RUN: ld.lld %t.o -o %t
# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s
# RUN: llvm-readelf -S -s %t | FileCheck --check-prefixes=SEC,SYM %s
# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s

# RUN: llvm-mc -filetype=obj -triple=powerpcle %s -o %t.o
# RUN: ld.lld %t.o -o %t
# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s
# RUN: llvm-readelf -S -s %t | FileCheck --check-prefixes=SEC,SYM %s
# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s

# RELOC:      .rela.dyn {
# RELOC-NEXT:   0x10020118 R_PPC_IRELATIVE - 0x100100E0
# RELOC-NEXT: }

# SEC: .rela.dyn RELA 100000d4 0000d4 00000c
# SYM: 100100e0 0 FUNC GLOBAL DEFAULT {{.*}} func

# CHECK-LABEL: <func_resolver>:
# CHECK-NEXT:    100100e0:
# CHECK-LABEL: <_start>:
# CHECK-NEXT:    bl 0x100100f8
## .rela.plt = 0x100000d4 = 65536*4096+212
## end(.rela.plt) = 0x100000d4+0xc = 65536*4096+224
# CHECK-NEXT:    lis 9, 4096
# CHECK-NEXT:    lis 8, 4096
# CHECK-NEXT:    addi 9, 9, 212
# CHECK-NEXT:    addi 8, 8, 224

.globl func
.type func, @gnu_indirect_function
func:
.globl func_resolver
.type func_resolver, @function
func_resolver:
  blr

.globl _start
_start:
  bl func

  lis 9, __rela_iplt_start@ha
  lis 8, __rela_iplt_end@ha
  la 9, __rela_iplt_start@l(9)
  la 8, __rela_iplt_end@l(8)