aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/ARM/elf-movt.s
diff options
context:
space:
mode:
authorJason W Kim <jason.w.kim.2009@gmail.com>2011-01-12 00:19:25 +0000
committerJason W Kim <jason.w.kim.2009@gmail.com>2011-01-12 00:19:25 +0000
commit86a97f2e4d0cde5e992f52ac287da0de687e0110 (patch)
tree01858579ad29bbd87f7a52a134b338fe4a5ade44 /test/MC/ARM/elf-movt.s
parent9081b4b4cf89a161246e037f4817c69de2fcdf82 (diff)
downloadexternal_llvm-86a97f2e4d0cde5e992f52ac287da0de687e0110.zip
external_llvm-86a97f2e4d0cde5e992f52ac287da0de687e0110.tar.gz
external_llvm-86a97f2e4d0cde5e992f52ac287da0de687e0110.tar.bz2
1. Support ELF pcrel relocations for movw/movt:
R_ARM_MOVT_PREL and R_ARM_MOVW_PREL_NC. 2. Fix minor bug in ARMAsmPrinter - treat bitfield flag as a bitfield, not an enum. 3. Add support for 3 new elf section types (no-ops) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123294 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/ARM/elf-movt.s')
-rw-r--r--test/MC/ARM/elf-movt.s25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/MC/ARM/elf-movt.s b/test/MC/ARM/elf-movt.s
index 51c5429..066b2d1 100644
--- a/test/MC/ARM/elf-movt.s
+++ b/test/MC/ARM/elf-movt.s
@@ -1,4 +1,6 @@
@ RUN: llvm-mc %s -triple=armv7-linux-gnueabi | FileCheck -check-prefix=ASM %s
+@ RUN: llvm-mc %s -triple=armv7-linux-gnueabi -filetype=obj -o - | \
+@ RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s
.syntax unified
.text
.globl barf
@@ -12,3 +14,26 @@ barf: @ @barf
@ ASM: movw r0, :lower16:GOT-(.LPC0_2+8)
@ ASM-NEXT: movt r0, :upper16:GOT-(.LPC0_2+16)
+@@ make sure that the text section fixups are sane too
+@ OBJ: '.text'
+@ OBJ-NEXT: 'sh_type', 0x00000001
+@ OBJ-NEXT: 'sh_flags', 0x00000006
+@ OBJ-NEXT: 'sh_addr', 0x00000000
+@ OBJ-NEXT: 'sh_offset', 0x00000034
+@ OBJ-NEXT: 'sh_size', 0x00000008
+@ OBJ-NEXT: 'sh_link', 0x00000000
+@ OBJ-NEXT: 'sh_info', 0x00000000
+@ OBJ-NEXT: 'sh_addralign', 0x00000004
+@ OBJ-NEXT: 'sh_entsize', 0x00000000
+@ OBJ-NEXT: '_section_data', 'f00f0fe3 ec0f4fe3'
+
+@ OBJ: Relocation 0x00000000
+@ OBJ-NEXT: 'r_offset', 0x00000000
+@ OBJ-NEXT: 'r_sym'
+@ OBJ-NEXT: 'r_type', 0x0000002d
+
+@ OBJ: Relocation 0x00000001
+@ OBJ-NEXT: 'r_offset', 0x00000004
+@ OBJ-NEXT: 'r_sym'
+@ OBJ-NEXT: 'r_type', 0x0000002e
+