Home | History | Annotate | Download | only in ARM
      1 @ RUN: llvm-mc -n -triple armv7-apple-darwin10 %s -filetype=obj -o %t.o
      2 @ RUN: macho-dump --dump-section-data < %t.o | FileCheck %s
      3 
      4 @ rdar://12359919
      5 
      6 	.syntax unified
      7 	.text
      8 
      9 	.globl	_bar
     10 	.align	2
     11 	.code	16
     12 	.thumb_func	_bar
     13 _bar:
     14 	push	{r7, lr}
     15 	mov	r7, sp
     16 	bl	_foo
     17 	pop	{r7, pc}
     18 
     19 
     20 _junk:
     21 @ Make the _foo symbol sufficiently far away to force the 'bl' relocation
     22 @ above to be out of range. On Darwin, the assembler deals with this by
     23 @ generating an external relocation so the linker can create a branch
     24 @ island.
     25 
     26   .space 20000000
     27 
     28   .section	__TEXT,initcode,regular,pure_instructions
     29 
     30 	.globl	_foo
     31 	.align	2
     32 	.code	16
     33 _foo:
     34 	push	{r7, lr}
     35 	mov	r7, sp
     36 	pop	{r7, pc}
     37 
     38 
     39 @ CHECK:  ('_relocations', [
     40 @ CHECK:    # Relocation 0
     41 @ CHECK:    (('word-0', 0x4),
     42 @ CHECK:     ('word-1', 0x6d000002)),
     43 @ CHECK:  ])
     44