~ubuntu-branches/ubuntu/trusty/llvm-toolchain-snapshot/trusty-201310232150

« back to all changes in this revision

Viewing changes to test/MC/ARM/eh-directive-text-section-multiple-func.s

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-27 15:01:57 UTC
  • mfrom: (0.10.1) (0.9.1) (0.8.1) (0.7.1) (0.6.1) (0.5.2)
  • Revision ID: package-import@ubuntu.com-20130527150157-tdkrsjpuvht7v0qx
Tags: 1:3.4~svn182733-1~exp1
* New snapshot release (3.4 release)
* Add a symlink of libLLVM-3.4.so.1 to usr/lib/llvm-3.4/lib/libLLVM-3.4.so
    to fix make the llvm-config-3.4 --libdir work (Closes: #708677)
  * Various packages rename to allow co installations:
    * libclang1 => libclang1-3.4
    * libclang1-dbg => libclang1-3.4-dbg
    * libclang-dev => libclang-3.4-dev
    * libclang-common-dev => libclang-common-3.4-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
@ RUN: llvm-mc %s -triple=armv7-unknown-linux-gnueabi -filetype=obj -o - \
 
2
@ RUN:   | llvm-readobj -s -sd -sr -r -t | FileCheck %s
 
3
 
 
4
@ Check whether the section is switched back or not.
 
5
 
 
6
@ The assembler should emit the machine code of "func2" in .text section.
 
7
@ It is incorrect if the machine code is emitted in .ARM.exidx or .ARM.extab.
 
8
@ Besides, there should be two entries in .ARM.exidx section.
 
9
 
 
10
        .syntax unified
 
11
 
 
12
        .text
 
13
        .globl  func1
 
14
        .align  2
 
15
        .type   func1,%function
 
16
        .fnstart
 
17
func1:
 
18
        bx      lr
 
19
        .fnend
 
20
 
 
21
        .globl  func2
 
22
        .align  2
 
23
        .type   func2,%function
 
24
        .fnstart
 
25
func2:
 
26
        bx      lr
 
27
        .fnend
 
28
 
 
29
 
 
30
@-------------------------------------------------------------------------------
 
31
@ Check the .text section.  There should be two "bx lr" instructions.
 
32
@-------------------------------------------------------------------------------
 
33
@ CHECK: Sections [
 
34
@ CHECK:   Section {
 
35
@ CHECK:     Name: .text
 
36
@ CHECK:     SectionData (
 
37
@ CHECK:       0000: 1EFF2FE1 1EFF2FE1                    |../.../.|
 
38
@ CHECK:     )
 
39
@ CHECK:   }
 
40
 
 
41
 
 
42
@-------------------------------------------------------------------------------
 
43
@ Check the .ARM.exidx section.
 
44
@ There should be two entries (two words per entry.)
 
45
@-------------------------------------------------------------------------------
 
46
@ CHECK:   Section {
 
47
@ CHECK:     Name: .ARM.exidx
 
48
@-------------------------------------------------------------------------------
 
49
@ The first word of each entry should be relocated to .text section.
 
50
@-------------------------------------------------------------------------------
 
51
@ CHECK:     Relocations [
 
52
@ CHECK:       0x0 R_ARM_PREL31 .text 0x0
 
53
@ CHECK:       0x0 R_ARM_NONE __aeabi_unwind_cpp_pr0 0x0
 
54
@ CHECK:       0x8 R_ARM_PREL31 .text 0x0
 
55
@ CHECK:     ]
 
56
@ CHECK:     SectionData (
 
57
@-------------------------------------------------------------------------------
 
58
@ The first word should be the offset to .text.  The second word should be
 
59
@ 0xB0B0B080, which means compact model 0 is used (0x80) and the rest of the
 
60
@ word is filled with FINISH opcode (0xB0).
 
61
@-------------------------------------------------------------------------------
 
62
@ CHECK:       0000: 00000000 B0B0B080 04000000 B0B0B080 |................|
 
63
@ CHECK:     )
 
64
@ CHECK:   }
 
65
@ CHECK: ]
 
66
 
 
67
 
 
68
 
 
69
@-------------------------------------------------------------------------------
 
70
@ Check the symbols "func1" and "func2".  They should belong to .text section.
 
71
@-------------------------------------------------------------------------------
 
72
@ CHECK: Symbols [
 
73
@ CHECK:   Symbol {
 
74
@ CHECK:     Name: func1
 
75
@ CHECK:     Section: .text (0x1)
 
76
@ CHECK:   }
 
77
@ CHECK:   Symbol {
 
78
@ CHECK:     Name: func2
 
79
@ CHECK:     Section: .text (0x1)
 
80
@ CHECK:   }
 
81
@ CHECK: ]