• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1@ RUN: llvm-mc %s -triple=armv7-unknown-linux-gnueabi -filetype=obj -o - \
2@ RUN:   | llvm-readobj -S --sd --sr - | FileCheck %s
3
4@ Check the .cantunwind directive
5
6@ When a function contains a .cantunwind directive, we should create an entry
7@ in corresponding .ARM.exidx, and its second word should be EXIDX_CANTUNWIND.
8
9	.syntax	unified
10
11	.text
12	.globl	func1
13	.align	2
14	.type	func1,%function
15	.fnstart
16func1:
17	bx	lr
18	.cantunwind
19	.fnend
20
21
22
23@-------------------------------------------------------------------------------
24@ Check .text section
25@-------------------------------------------------------------------------------
26@ CHECK: Sections [
27@ CHECK:   Section {
28@ CHECK:     Name: .text
29@ CHECK:     SectionData (
30@ CHECK:       0000: 1EFF2FE1                             |../.|
31@ CHECK:     )
32@ CHECK:   }
33
34
35@-------------------------------------------------------------------------------
36@ Check .ARM.exidx section
37@-------------------------------------------------------------------------------
38@ CHECK:   Section {
39@ CHECK:     Name: .ARM.exidx
40@-------------------------------------------------------------------------------
41@ The first word should be the offset to .text.
42@ The second word should be EXIDX_CANTUNWIND (01000000).
43@-------------------------------------------------------------------------------
44@ CHECK:     SectionData (
45@ CHECK:       0000: 00000000 01000000                    |........|
46@ CHECK:     )
47@ CHECK:   }
48@ CHECK: ]
49@ CHECK:     Relocations [
50@ CHECK:       0x0 R_ARM_PREL31 .text 0x0
51@ CHECK:     ]
52