File: arm-thumb-interwork-shared.s

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-20
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,496,436 kB
  • sloc: cpp: 5,593,990; ansic: 986,873; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,547; xml: 953; cs: 573; fortran: 567
file content (60 lines) | stat: -rw-r--r-- 2,080 bytes parent folder | download | duplicates (3)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
// REQUIRES: arm
// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=thumbv7a-none-linux-gnueabi %s -o %t
// RUN: ld.lld %t --shared -o %t.so
// RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck %s
 .syntax unified
 .global sym1
 .global elsewhere
 .weak weakref
sym1:
 b.w elsewhere
 b.w weakref

 bl elsewhere
 bl weakref

// Check that we generate a thunk for an undefined symbol called via a plt
// entry.

// CHECK: Disassembly of section .text:
// CHECK-EMPTY:
// CHECK-NEXT: <sym1>:
// CHECK-NEXT:    101e0: b.w 0x101f0 <__ThumbV7PILongThunk_elsewhere>
// CHECK-NEXT:           b.w 0x101fc <__ThumbV7PILongThunk_weakref>
// CHECK-NEXT:           blx 0x10230
// CHECK-NEXT:           blx 0x10240
// CHECK: <__ThumbV7PILongThunk_elsewhere>:
// CHECK-NEXT:     101f0: movw    r12, #52
// CHECK-NEXT:           movt    r12, #0
// CHECK-NEXT:           add     r12, pc
// CHECK-NEXT:           bx      r12
// CHECK: <__ThumbV7PILongThunk_weakref>:
// CHECK-NEXT:     101fc: movw    r12, #56
// CHECK-NEXT:           movt    r12, #0
// CHECK-NEXT:           add     r12, pc
// CHECK-NEXT:           bx      r12

// CHECK: Disassembly of section .plt:
// CHECK-EMPTY:
// CHECK-NEXT: <$a>:
// CHECK-NEXT:     10210: str     lr, [sp, #-4]!
// CHECK-NEXT:           add     lr, pc, #0, #12
// CHECK-NEXT:           add     lr, lr, #32
// CHECK-NEXT:           ldr     pc, [lr, #148]!
// CHECK: <$d>:
// CHECK-NEXT:     10220: d4 d4 d4 d4 .word   0xd4d4d4d4
// CHECK-NEXT:           .word   0xd4d4d4d4
// CHECK-NEXT:           .word   0xd4d4d4d4
// CHECK-NEXT:           .word   0xd4d4d4d4
// CHECK: <$a>:
// CHECK-NEXT:     10230: add     r12, pc, #0, #12
// CHECK-NEXT:           add     r12, r12, #32
// CHECK-NEXT:           ldr     pc, [r12, #124]!
// CHECK: <$d>:
// CHECK-NEXT:     1023c: d4 d4 d4 d4 .word   0xd4d4d4d4
// CHECK: <$a>:
// CHECK-NEXT:     10240: add     r12, pc, #0, #12
// CHECK-NEXT:           add     r12, r12, #32
// CHECK-NEXT:           ldr     pc, [r12, #112]!
// CHECK: <$d>:
// CHECK-NEXT:     1024c: d4 d4 d4 d4 .word   0xd4d4d4d4