Home | History | Annotate | Download | only in arm
      1 @ Check that non-local branches with and without mode switching
      2 @ produce the right relocations with appropriate in-place addends.
      3 
      4 	.syntax unified
      5 
      6 	.text
      7 	.arm
      8 	.global arm_glob_sym1
      9 	.global arm_glob_sym2
     10 	.global thumb_glob_sym1
     11 	.global thumb_glob_sym2
     12 	nop
     13 	.type arm_glob_sym1, %function
     14 arm_glob_sym1:
     15 	bl thumb_glob_sym1
     16 	bl thumb_glob_sym2
     17 	bl thumb_sym1
     18 	bl arm_glob_sym1
     19 	bl arm_glob_sym2
     20 	bl arm_sym1
     21 	blx thumb_glob_sym1
     22 	blx thumb_glob_sym2
     23 	blx thumb_sym1
     24 	blx arm_glob_sym1
     25 	blx arm_glob_sym2
     26 	blx arm_sym1
     27 	nop
     28 	bx lr
     29 
     30 	.type arm_sym1, %function
     31 arm_sym1:
     32 	nop
     33 	bx lr
     34 
     35 	.thumb
     36 	.thumb_func
     37 	.type thumb_sym1, %function
     38 thumb_sym1:
     39 	bx lr
     40 
     41 	.type thumb_glob_sym1, %function
     42 	.thumb_func
     43 	.thumb
     44 thumb_glob_sym1:
     45 	bx lr
     46 
     47 	.section foo,"ax"
     48 
     49 @ Add some space to avoid confusing objdump output: as we are
     50 @ producing a relocatable file, objdump may match an address to
     51 @ the wrong symbol (as symbols in different sections may have the same
     52 @ address in the object file).
     53 	.space 0x100
     54 
     55 	.type thumb_glob_sym2, %function
     56 	.thumb_func
     57 	.thumb
     58 thumb_glob_sym2:
     59 	bl arm_glob_sym1
     60 	bl arm_glob_sym2
     61 	bl arm_sym2
     62 	bl thumb_glob_sym1
     63 	bl thumb_glob_sym2
     64 	bl thumb_sym2
     65 	blx arm_glob_sym1
     66 	blx arm_glob_sym2
     67 	blx arm_sym2
     68 	blx thumb_glob_sym1
     69 	blx thumb_glob_sym2
     70 	blx thumb_sym2
     71 	nop
     72 	bx lr
     73 
     74 	.type thumb_sym2, %function
     75 thumb_sym2:
     76 	nop
     77 	bx lr
     78 
     79 	.arm
     80 	.type arm_sym2, %function
     81 arm_sym2:
     82 	bx lr
     83 
     84 	.global arm_glob_sym2
     85 	.type arm_glob_sym2, %function
     86 arm_glob_sym2:
     87 	bx lr
     88