@@ -61,14 +61,16 @@ pub unsafe fn __aeabi_ldivmod() {
61
61
62
62
// FIXME: The `*4` and `*8` variants should be defined as aliases.
63
63
64
+ #[ cfg( not( target_os = "ios" ) ) ]
64
65
#[ cfg_attr( not( feature = "mangled-names" ) , no_mangle) ]
65
- #[ linkage = "weak" ]
66
+ #[ cfg_attr ( thumb , linkage = "weak" ) ]
66
67
pub unsafe extern "aapcs" fn __aeabi_memcpy ( dest : * mut u8 , src : * const u8 , n : usize ) {
67
68
mem:: memcpy ( dest, src, n) ;
68
69
}
69
70
71
+ #[ cfg( not( target_os = "ios" ) ) ]
70
72
#[ cfg_attr( not( feature = "mangled-names" ) , no_mangle) ]
71
- #[ linkage = "weak" ]
73
+ #[ cfg_attr ( thumb , linkage = "weak" ) ]
72
74
pub unsafe extern "aapcs" fn __aeabi_memcpy4 ( dest : * mut u8 , src : * const u8 , mut n : usize ) {
73
75
let mut dest = dest as * mut u32 ;
74
76
let mut src = src as * mut u32 ;
@@ -83,39 +85,45 @@ pub unsafe extern "aapcs" fn __aeabi_memcpy4(dest: *mut u8, src: *const u8, mut
83
85
__aeabi_memcpy ( dest as * mut u8 , src as * const u8 , n) ;
84
86
}
85
87
88
+ #[ cfg( not( target_os = "ios" ) ) ]
86
89
#[ cfg_attr( not( feature = "mangled-names" ) , no_mangle) ]
87
- #[ linkage = "weak" ]
90
+ #[ cfg_attr ( thumb , linkage = "weak" ) ]
88
91
pub unsafe extern "aapcs" fn __aeabi_memcpy8 ( dest : * mut u8 , src : * const u8 , n : usize ) {
89
92
__aeabi_memcpy4 ( dest, src, n) ;
90
93
}
91
94
95
+ #[ cfg( not( target_os = "ios" ) ) ]
92
96
#[ cfg_attr( not( feature = "mangled-names" ) , no_mangle) ]
93
- #[ linkage = "weak" ]
97
+ #[ cfg_attr ( thumb , linkage = "weak" ) ]
94
98
pub unsafe extern "aapcs" fn __aeabi_memmove ( dest : * mut u8 , src : * const u8 , n : usize ) {
95
99
mem:: memmove ( dest, src, n) ;
96
100
}
97
101
102
+ #[ cfg( not( target_os = "ios" ) ) ]
98
103
#[ cfg_attr( not( feature = "mangled-names" ) , no_mangle) ]
99
- #[ linkage = "weak" ]
104
+ #[ cfg_attr ( thumb , linkage = "weak" ) ]
100
105
pub unsafe extern "aapcs" fn __aeabi_memmove4 ( dest : * mut u8 , src : * const u8 , n : usize ) {
101
106
__aeabi_memmove ( dest, src, n) ;
102
107
}
103
108
109
+ #[ cfg( not( target_os = "ios" ) ) ]
104
110
#[ cfg_attr( not( feature = "mangled-names" ) , no_mangle) ]
105
- #[ linkage = "weak" ]
111
+ #[ cfg_attr ( thumb , linkage = "weak" ) ]
106
112
pub unsafe extern "aapcs" fn __aeabi_memmove8 ( dest : * mut u8 , src : * const u8 , n : usize ) {
107
113
__aeabi_memmove ( dest, src, n) ;
108
114
}
109
115
110
- // Note the different argument order
116
+ # [ cfg ( not ( target_os = "ios" ) ) ]
111
117
#[ cfg_attr( not( feature = "mangled-names" ) , no_mangle) ]
112
- #[ linkage = "weak" ]
118
+ #[ cfg_attr ( thumb , linkage = "weak" ) ]
113
119
pub unsafe extern "aapcs" fn __aeabi_memset ( dest : * mut u8 , n : usize , c : i32 ) {
120
+ // Note the different argument order
114
121
mem:: memset ( dest, c, n) ;
115
122
}
116
123
124
+ #[ cfg( not( target_os = "ios" ) ) ]
117
125
#[ cfg_attr( not( feature = "mangled-names" ) , no_mangle) ]
118
- #[ linkage = "weak" ]
126
+ #[ cfg_attr ( thumb , linkage = "weak" ) ]
119
127
pub unsafe extern "aapcs" fn __aeabi_memset4 ( dest : * mut u8 , mut n : usize , c : i32 ) {
120
128
let mut dest = dest as * mut u32 ;
121
129
@@ -131,26 +139,30 @@ pub unsafe extern "aapcs" fn __aeabi_memset4(dest: *mut u8, mut n: usize, c: i32
131
139
__aeabi_memset ( dest as * mut u8 , n, byte as i32 ) ;
132
140
}
133
141
142
+ #[ cfg( not( target_os = "ios" ) ) ]
134
143
#[ cfg_attr( not( feature = "mangled-names" ) , no_mangle) ]
135
- #[ linkage = "weak" ]
144
+ #[ cfg_attr ( thumb , linkage = "weak" ) ]
136
145
pub unsafe extern "aapcs" fn __aeabi_memset8 ( dest : * mut u8 , n : usize , c : i32 ) {
137
146
__aeabi_memset4 ( dest, n, c) ;
138
147
}
139
148
149
+ #[ cfg( not( target_os = "ios" ) ) ]
140
150
#[ cfg_attr( not( feature = "mangled-names" ) , no_mangle) ]
141
- #[ linkage = "weak" ]
151
+ #[ cfg_attr ( thumb , linkage = "weak" ) ]
142
152
pub unsafe extern "aapcs" fn __aeabi_memclr ( dest : * mut u8 , n : usize ) {
143
153
__aeabi_memset ( dest, n, 0 ) ;
144
154
}
145
155
156
+ #[ cfg( not( target_os = "ios" ) ) ]
146
157
#[ cfg_attr( not( feature = "mangled-names" ) , no_mangle) ]
147
- #[ linkage = "weak" ]
158
+ #[ cfg_attr ( thumb , linkage = "weak" ) ]
148
159
pub unsafe extern "aapcs" fn __aeabi_memclr4 ( dest : * mut u8 , n : usize ) {
149
160
__aeabi_memset4 ( dest, n, 0 ) ;
150
161
}
151
162
163
+ #[ cfg( not( target_os = "ios" ) ) ]
152
164
#[ cfg_attr( not( feature = "mangled-names" ) , no_mangle) ]
153
- #[ linkage = "weak" ]
165
+ #[ cfg_attr ( thumb , linkage = "weak" ) ]
154
166
pub unsafe extern "aapcs" fn __aeabi_memclr8 ( dest : * mut u8 , n : usize ) {
155
167
__aeabi_memset4 ( dest, n, 0 ) ;
156
168
}
0 commit comments