2011-01-12 00:53:41 +01:00
|
|
|
@ RUN: llvm-mc %s -triple=armv7-linux-gnueabi | FileCheck -check-prefix=ASM %s
|
2011-01-12 01:19:25 +01:00
|
|
|
@ RUN: llvm-mc %s -triple=armv7-linux-gnueabi -filetype=obj -o - | \
|
|
|
|
@ RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s
|
2011-01-12 00:53:41 +01:00
|
|
|
.syntax unified
|
|
|
|
.text
|
|
|
|
.globl barf
|
|
|
|
.align 2
|
|
|
|
.type barf,%function
|
|
|
|
barf: @ @barf
|
|
|
|
@ BB#0: @ %entry
|
|
|
|
movw r0, :lower16:GOT-(.LPC0_2+8)
|
|
|
|
movt r0, :upper16:GOT-(.LPC0_2+16)
|
|
|
|
.LPC0_2:
|
2011-01-13 08:58:56 +01:00
|
|
|
@ ASM: movw r0, :lower16:(GOT-(.LPC0_2+8))
|
|
|
|
@ ASM-NEXT: movt r0, :upper16:(GOT-(.LPC0_2+16))
|
2011-01-12 00:53:41 +01:00
|
|
|
|
2011-01-12 01:19:25 +01:00
|
|
|
@@ 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
|
2011-01-14 03:38:49 +01:00
|
|
|
@ OBJ-NEXT: '_section_data', 'f00f0fe3 ff0f4fe3'
|
2011-01-12 01:19:25 +01:00
|
|
|
|
|
|
|
@ 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
|
|
|
|
|