@@ -23,9 +23,7 @@ thumb_func_with_explicit_notype:
2323/// All the symbols that are targets of the branch relocations do not have
2424/// type STT_FUNC. LLD should not insert interworking thunks as non STT_FUNC
2525/// symbols have no state information, the ABI assumes the user has manually
26- /// done the interworking. For the BL and BLX instructions LLD should
27- /// preserve the original instruction instead of writing out the correct one
28- /// for the assumed state at the target.
26+ /// done the interworking.
2927.section .arm_caller, "ax" , %progbits
3028.balign 4
3129.arm
@@ -37,24 +35,10 @@ _start:
3735 b .thumb_target
3836 b thumb_func_with_notype
3937 b thumb_func_with_explicit_notype
40- bl .arm_target
41- bl arm_func_with_notype
42- bl arm_func_with_explicit_notype
43- bl .thumb_target
44- bl thumb_func_with_notype
45- bl thumb_func_with_explicit_notype
46- blx .arm_target
47- blx arm_func_with_notype
48- blx arm_func_with_explicit_notype
49- blx .thumb_target
50- blx thumb_func_with_notype
51- blx thumb_func_with_explicit_notype
5238
5339 .section .thumb_caller, "ax" , %progbits
5440 .thumb
5541 .balign 4
56- .global thumb_caller
57- thumb_caller:
5842 b.w .arm_target
5943 b.w arm_func_with_notype
6044 b.w arm_func_with_explicit_notype
@@ -67,18 +51,6 @@ thumb_caller:
6751 beq.w .thumb_target
6852 beq.w thumb_func_with_notype
6953 beq.w thumb_func_with_explicit_notype
70- bl .arm_target
71- bl arm_func_with_notype
72- bl arm_func_with_explicit_notype
73- bl .thumb_target
74- bl thumb_func_with_notype
75- bl thumb_func_with_explicit_notype
76- blx .arm_target
77- blx arm_func_with_notype
78- blx arm_func_with_explicit_notype
79- blx .thumb_target
80- blx thumb_func_with_notype
81- blx thumb_func_with_explicit_notype
8254
8355// CHECK: 00012008 _start:
8456// CHECK-NEXT: 12008: b #-16
@@ -87,41 +59,15 @@ thumb_caller:
8759// CHECK-NEXT: 12014: b #-24
8860// CHECK-NEXT: 12018: b #-28
8961// CHECK-NEXT: 1201c: b #-32
90- // CHECK-NEXT: 12020: bl #-40
91- // CHECK-NEXT: 12024: bl #-44
92- // CHECK-NEXT: 12028: bl #-48
93- // CHECK-NEXT: 1202c: bl #-48
94- // CHECK-NEXT: 12030: bl #-52
95- // CHECK-NEXT: 12034: bl #-56
96- // CHECK-NEXT: 12038: blx #-64
97- // CHECK-NEXT: 1203c: blx #-68
98- // CHECK-NEXT: 12040: blx #-72
99- // CHECK-NEXT: 12044: blx #-72
100- // CHECK-NEXT: 12048: blx #-76
101- // CHECK-NEXT: 1204c: blx #-80
102-
103- // CHECK: 00012050 thumb_caller:
104- // CHECK-NEXT: 12050: b.w #-84
105- // CHECK-NEXT: 12054: b.w #-88
106- // CHECK-NEXT: 12058: b.w #-92
107- // CHECK-NEXT: 1205c: b.w #-92
108- // CHECK-NEXT: 12060: b.w #-96
109- // CHECK-NEXT: 12064: b.w #-100
110- // CHECK-NEXT: 12068: beq.w #-108
111- // CHECK-NEXT: 1206c: beq.w #-112
112- // CHECK-NEXT: 12070: beq.w #-116
113- // CHECK-NEXT: 12074: beq.w #-116
114- // CHECK-NEXT: 12078: beq.w #-120
115- // CHECK-NEXT: 1207c: beq.w #-124
116- // CHECK-NEXT: 12080: bl #-132
117- // CHECK-NEXT: 12084: bl #-136
118- // CHECK-NEXT: 12088: bl #-140
119- // CHECK-NEXT: 1208c: bl #-140
120- // CHECK-NEXT: 12090: bl #-144
121- // CHECK-NEXT: 12094: bl #-148
122- // CHECK-NEXT: 12098: blx #-156
123- // CHECK-NEXT: 1209c: blx #-160
124- // CHECK-NEXT: 120a0: blx #-164
125- // CHECK-NEXT: 120a4: blx #-164
126- // CHECK-NEXT: 120a8: blx #-168
127- // CHECK-NEXT: 120ac: blx #-172
62+ // CHECK: 12020: b.w #-36
63+ // CHECK-NEXT: 12024: b.w #-40
64+ // CHECK-NEXT: 12028: b.w #-44
65+ // CHECK-NEXT: 1202c: b.w #-44
66+ // CHECK-NEXT: 12030: b.w #-48
67+ // CHECK-NEXT: 12034: b.w #-52
68+ // CHECK-NEXT: 12038: beq.w #-60
69+ // CHECK-NEXT: 1203c: beq.w #-64
70+ // CHECK-NEXT: 12040: beq.w #-68
71+ // CHECK-NEXT: 12044: beq.w #-68
72+ // CHECK-NEXT: 12048: beq.w #-72
73+ // CHECK-NEXT: 1204c: beq.w #-76
0 commit comments