* elf32-spu.c (build_stub): Fix malloc under-allocation.
[binutils.git] / gas / testsuite / gas / arm / branch-reloc.s
blobb01146e20d0bad34b6b74f71bd1c64fa28901e22
1 @ Check that non-local branches with and without mode switching
2 @ produce the right relocations with appropriate in-place addends.
4 .syntax unified
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
30 .type arm_sym1, %function
31 arm_sym1:
32 nop
33 bx lr
35 .thumb
36 .thumb_func
37 .type thumb_sym1, %function
38 thumb_sym1:
39 bx lr
41 .type thumb_glob_sym1, %function
42 .thumb_func
43 .thumb
44 thumb_glob_sym1:
45 bx lr
47 .section foo,"ax"
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
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
74 .type thumb_sym2, %function
75 thumb_sym2:
76 nop
77 bx lr
79 .arm
80 .type arm_sym2, %function
81 arm_sym2:
82 bx lr
84 .global arm_glob_sym2
85 .type arm_glob_sym2, %function
86 arm_glob_sym2:
87 bx lr