File: arm-thumb-thunk-symbols.s

package info (click to toggle)
swiftlang 6.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,791,604 kB
  • sloc: cpp: 9,901,740; ansic: 2,201,431; asm: 1,091,827; python: 308,252; objc: 82,166; f90: 80,126; lisp: 38,358; pascal: 25,559; sh: 20,429; ml: 5,058; perl: 4,745; makefile: 4,484; awk: 3,535; javascript: 3,018; xml: 918; fortran: 664; cs: 573; ruby: 396
file content (42 lines) | stat: -rw-r--r-- 1,294 bytes parent folder | download | duplicates (23)
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
// REQUIRES: arm
// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t
// RUN: ld.lld %t -o %t2
// RUN: llvm-readobj --symbols %t2 | FileCheck %s
// RUN: ld.lld --shared %t -o %t3
// RUN: llvm-readobj --symbols %t3 | FileCheck -check-prefix=CHECK-PI %s

// Check that the symbols generated for Thunks have the correct symbol type
// of STT_FUNC and the correct value of bit 0 (0 for ARM 1 for Thumb)
 .syntax unified
 .section .text.thumb, "ax", %progbits
 .thumb
 .balign 0x1000
 .globl thumb_fn
 .type thumb_fn, %function
thumb_fn:
 b.w arm_fn

 .section .text.arm, "ax", %progbits
 .arm
 .balign 0x1000
 .globl arm_fn
 .type arm_fn, %function
arm_fn:
 b thumb_fn

// CHECK:     Name: __Thumbv7ABSLongThunk_arm_fn
// CHECK-NEXT:     Value: 0x22005
// CHECK-NEXT:     Size: 10
// CHECK-NEXT:    Binding: Local (0x0)
// CHECK-NEXT:    Type: Function (0x2)
// CHECK:     Name: __ARMv7ABSLongThunk_thumb_fn
// CHECK-NEXT:     Value: 0x22010
// CHECK-NEXT:     Size: 12
// CHECK-NEXT:    Binding: Local (0x0)
// CHECK-NEXT:    Type: Function (0x2)

// CHECK-PI:     Name: __ThumbV7PILongThunk_arm_fn
// CHECK-PI-NEXT:     Value: 0x12005
// CHECK-PI-NEXT:     Size: 12
// CHECK-PI-NEXT:    Binding: Local (0x0)
// CHECK-PI-NEXT:    Type: Function (0x2)