brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.6 KiB · b84c59b Raw
82 lines · plain
1@ RUN: llvm-mc %s -triple=armv7-unknown-linux-gnueabi -filetype=obj -o - \2@ RUN:   | llvm-readobj -S --sd --sr -r --symbols - | FileCheck %s3 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	unified11 12	.text13	.globl	func114	.align	215	.type	func1,%function16	.fnstart17func1:18	bx	lr19	.fnend20 21	.globl	func222	.align	223	.type	func2,%function24	.fnstart25func2:26	bx	lr27	.fnend28 29 30@-------------------------------------------------------------------------------31@ Check the .text section.  There should be two "bx lr" instructions.32@-------------------------------------------------------------------------------33@ CHECK: Sections [34@ CHECK:   Section {35@ CHECK:     Name: .text36@ 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.exidx48@ CHECK:     SectionData (49@-------------------------------------------------------------------------------50@ The first word should be the offset to .text.  The second word should be51@ 0xB0B0B080, which means compact model 0 is used (0x80) and the rest of the52@ word is filled with FINISH opcode (0xB0).53@-------------------------------------------------------------------------------54@ CHECK:       0000: 00000000 B0B0B080 04000000 B0B0B080 |................|55@ CHECK:     )56@ CHECK:   }57@ CHECK: ]58 59@-------------------------------------------------------------------------------60@ The first word of each entry should be relocated to .text section.61@-------------------------------------------------------------------------------62@ CHECK:     Relocations [63@ CHECK:       0x0 R_ARM_PREL31 .text64@ CHECK:       0x0 R_ARM_NONE __aeabi_unwind_cpp_pr065@ CHECK:       0x8 R_ARM_PREL31 .text66@ CHECK:     ]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: func175@ CHECK:     Section: .text76@ CHECK:   }77@ CHECK:   Symbol {78@ CHECK:     Name: func279@ CHECK:     Section: .text80@ CHECK:   }81@ CHECK: ]82