[llvm-readobj] - Simplify stack-sizes.test test case.
[llvm-complete.git] / test / MC / ARM / reloc-directive.s
blob0855a7c2ad856bcc66978d8e279d4904a3057b17
1 # RUN: llvm-mc -triple=armv7-linux-gnueabi %s | FileCheck --check-prefix=PRINT %s
2 # RUN: llvm-mc -triple=armv7eb-linux-gnueabi %s | FileCheck --check-prefix=PRINT %s
4 # RUN: llvm-mc -filetype=obj -triple=armv7-linux-gnueabi %s -o %t
5 # RUN: llvm-readobj -r %t | FileCheck %s
6 # RUN: llvm-readelf -x .data %t | FileCheck --check-prefix=HEX %s
8 # RUN: llvm-mc -filetype=obj -triple=armv7eb-linux-gnueabi %s -o %t
9 # RUN: llvm-readobj -r %t | FileCheck %s
10 # RUN: llvm-readelf -x .data %t | FileCheck --check-prefix=HEX %s
12 .text
13 bx lr
14 nop
15 nop
16 .reloc 8, R_ARM_NONE, .data
17 .reloc 4, R_ARM_NONE, foo+4
18 .reloc 0, R_ARM_NONE, 8
20 .data
21 .globl foo
22 foo:
23 .word 0
24 .word 0
25 .word 0
27 # PRINT: .reloc 8, R_ARM_NONE, .data
28 # PRINT: .reloc 4, R_ARM_NONE, foo+4
29 # PRINT: .reloc 0, R_ARM_NONE, 8
31 # ARM relocations use the Elf32_Rel format. Addends are neither stored in the
32 # relocation entries nor applied in the referenced locations.
33 # CHECK: 0x8 R_ARM_NONE .data 0x0
34 # CHECK-NEXT: 0x4 R_ARM_NONE foo 0x0
35 # CHECK-NEXT: 0x0 R_ARM_NONE - 0x0
37 # HEX: 0x00000000 00000000 00000000