Compare commits
574 Commits
lollipop-c
...
l-preview
Author | SHA1 | Date | |
---|---|---|---|
![]() |
dec4de456c | ||
![]() |
4a9e1937c5 | ||
![]() |
5281e1fb15 | ||
![]() |
90aa7e374f | ||
![]() |
8bb12127e6 | ||
![]() |
3ce0769aa5 | ||
![]() |
e91d9cd4ad | ||
![]() |
f5e0258268 | ||
![]() |
ea6eae182a | ||
![]() |
4544d9f9bf | ||
![]() |
71cbcdcf94 | ||
![]() |
a7c2e0bad6 | ||
![]() |
97df16ba5c | ||
![]() |
1816025684 | ||
![]() |
c229705051 | ||
![]() |
a6bee4df4c | ||
![]() |
083769a3df | ||
![]() |
fee09e556f | ||
![]() |
94571f9ade | ||
![]() |
90a29db0f4 | ||
![]() |
4c0862474e | ||
![]() |
472cce5c98 | ||
![]() |
8c3901b299 | ||
![]() |
efee1ce46a | ||
![]() |
2698f9ef84 | ||
![]() |
14538ca75e | ||
![]() |
62a665a605 | ||
![]() |
78ba823033 | ||
![]() |
8dd3b65f2d | ||
![]() |
488268b134 | ||
![]() |
e9c216fca5 | ||
![]() |
9afb2f2106 | ||
![]() |
d0944d9ed3 | ||
![]() |
f183f95946 | ||
![]() |
8a7f8387b3 | ||
![]() |
ca75f9cdeb | ||
![]() |
72d72d9126 | ||
![]() |
0c0e728bd8 | ||
![]() |
667853d477 | ||
![]() |
cfd8c45725 | ||
![]() |
ac3c94d031 | ||
![]() |
51166d3aa2 | ||
![]() |
0511534dcb | ||
![]() |
bfeef2d3a9 | ||
![]() |
75129ae9f3 | ||
![]() |
3ea4d56ed4 | ||
![]() |
1364101067 | ||
![]() |
b4b15c63a1 | ||
![]() |
5cc5c5ea0b | ||
![]() |
2fbb1b653e | ||
![]() |
5a3ca37458 | ||
![]() |
c9e4f2de0a | ||
![]() |
658727e111 | ||
![]() |
3d773274ad | ||
![]() |
e8d9057e30 | ||
![]() |
7d3f553f98 | ||
![]() |
eeb9aa02b7 | ||
![]() |
b0fd55608e | ||
![]() |
6d2dd6a740 | ||
![]() |
75d66dd9a7 | ||
![]() |
81fca35672 | ||
![]() |
6869d26ad9 | ||
![]() |
b5cba6081b | ||
![]() |
1aaa17802c | ||
![]() |
9969fecad2 | ||
![]() |
f4320e867c | ||
![]() |
f04a8bc226 | ||
![]() |
513e29e16f | ||
![]() |
6d569b9201 | ||
![]() |
07e5bc152d | ||
![]() |
a6eef3be10 | ||
![]() |
884a3de60f | ||
![]() |
558ec8103b | ||
![]() |
db6fea86a5 | ||
![]() |
b84f667e93 | ||
![]() |
9b543ffeac | ||
![]() |
ae97a776ea | ||
![]() |
48be71d02b | ||
![]() |
4ef0e59f33 | ||
![]() |
8d0b2dbf21 | ||
![]() |
d5df4124bb | ||
![]() |
2d111d9eb1 | ||
![]() |
b19bd93f8b | ||
![]() |
1b20dafdbe | ||
![]() |
cadccfd708 | ||
![]() |
89fd32362b | ||
![]() |
7d849ac378 | ||
![]() |
76ac4d0853 | ||
![]() |
81156d93c5 | ||
![]() |
0c8fb51e6b | ||
![]() |
f8896c6c93 | ||
![]() |
12e3f22c7c | ||
![]() |
252c1ac973 | ||
![]() |
701cf9419b | ||
![]() |
e04aa450c2 | ||
![]() |
31e072fc9b | ||
![]() |
ecf532fa1c | ||
![]() |
c4bcc75f09 | ||
![]() |
1f7d5ac538 | ||
![]() |
6cdeb5234d | ||
![]() |
0481471b1b | ||
![]() |
e49491ada4 | ||
![]() |
3a5aeba4bd | ||
![]() |
d9898c5b82 | ||
![]() |
9997daa0ff | ||
![]() |
b104be321f | ||
![]() |
b0c0037370 | ||
![]() |
85a932c0c9 | ||
![]() |
c8bd2abab2 | ||
![]() |
96bc37f2e1 | ||
![]() |
73e6c9b393 | ||
![]() |
188d093993 | ||
![]() |
7ca5c4b99b | ||
![]() |
98ab0c52f5 | ||
![]() |
d644fecc8e | ||
![]() |
e93be99da0 | ||
![]() |
690211fcf8 | ||
![]() |
a4ed64d4c3 | ||
![]() |
aa66e88280 | ||
![]() |
8cf61dab5f | ||
![]() |
852d4fbbe9 | ||
![]() |
055a59c3ed | ||
![]() |
17e7d3208c | ||
![]() |
abefc93ff3 | ||
![]() |
a864e72b56 | ||
![]() |
528ad742c6 | ||
![]() |
567d3fcb7e | ||
![]() |
4fcfd3a474 | ||
![]() |
af12924f67 | ||
![]() |
5a69da8d7a | ||
![]() |
f05410edc6 | ||
![]() |
c08c25b4c9 | ||
![]() |
21db6ff108 | ||
![]() |
4a6e71100e | ||
![]() |
c2d39088d8 | ||
![]() |
9a05e3818a | ||
![]() |
fc5a93f7a2 | ||
![]() |
ebf37e3886 | ||
![]() |
04643c181c | ||
![]() |
a71b4c3f14 | ||
![]() |
c57e5c8289 | ||
![]() |
2169e17482 | ||
![]() |
31165edf57 | ||
![]() |
3c5037f1b3 | ||
![]() |
87b6906f6e | ||
![]() |
b05ec5ae93 | ||
![]() |
8642165344 | ||
![]() |
0ab5fd9a5a | ||
![]() |
49eed7db79 | ||
![]() |
08dc9d83a2 | ||
![]() |
93951cfa96 | ||
![]() |
0dc39f9952 | ||
![]() |
e8a95624b6 | ||
![]() |
34c987a6dd | ||
![]() |
b2da456253 | ||
![]() |
a186b2e0ca | ||
![]() |
d9cb0ed281 | ||
![]() |
60452a211c | ||
![]() |
9f423c554a | ||
![]() |
c296e4f151 | ||
![]() |
413de5b0d4 | ||
![]() |
04303f5a8a | ||
![]() |
e716044918 | ||
![]() |
6fe376d392 | ||
![]() |
adc01348ee | ||
![]() |
8e4d371091 | ||
![]() |
13d6023aac | ||
![]() |
d5e1c583a6 | ||
![]() |
fb8d60f743 | ||
![]() |
653676dde8 | ||
![]() |
755318548d | ||
![]() |
82e71085c2 | ||
![]() |
90be6c5fc5 | ||
![]() |
6ced005123 | ||
![]() |
bee1993a14 | ||
![]() |
0bd28a43da | ||
![]() |
ba8d4f460b | ||
![]() |
6a310f4ad6 | ||
![]() |
1b77423eff | ||
![]() |
77784cb9b7 | ||
![]() |
bf50e2645d | ||
![]() |
03fef1f511 | ||
![]() |
2ad11a96a1 | ||
![]() |
2f5cf100a8 | ||
![]() |
e2d86feb7b | ||
![]() |
3ec67de051 | ||
![]() |
36a5aa057c | ||
![]() |
56433ee2a2 | ||
![]() |
e7c9a387fa | ||
![]() |
f240aa8089 | ||
![]() |
34ac60ca16 | ||
![]() |
7c02d9428c | ||
![]() |
4a6e9a835a | ||
![]() |
17cc8e539a | ||
![]() |
b1a6c319c4 | ||
![]() |
1cff9a8964 | ||
![]() |
aea393c096 | ||
![]() |
8f61d99183 | ||
![]() |
380a3be757 | ||
![]() |
148dff3ec6 | ||
![]() |
370704d69d | ||
![]() |
837a962bf5 | ||
![]() |
5cba3c6f8e | ||
![]() |
2997ae83d5 | ||
![]() |
e8ba50fe0d | ||
![]() |
0b8f6d592a | ||
![]() |
36f451a6d9 | ||
![]() |
eb27bbae8f | ||
![]() |
95b0c6a940 | ||
![]() |
2c58104718 | ||
![]() |
2214a1ce17 | ||
![]() |
85ef3b5b80 | ||
![]() |
ae51accf22 | ||
![]() |
5c2264a136 | ||
![]() |
5681fe8eae | ||
![]() |
26a8eb50a8 | ||
![]() |
73d2059f9b | ||
![]() |
f83c208b82 | ||
![]() |
21451f5bf6 | ||
![]() |
c729d4f237 | ||
![]() |
a40a16eab1 | ||
![]() |
8fb639ca91 | ||
![]() |
69c2d7dc64 | ||
![]() |
460ad7454a | ||
![]() |
e39e47c6b3 | ||
![]() |
0f001b67fe | ||
![]() |
d74aa58035 | ||
![]() |
aad92067bf | ||
![]() |
66bbf1595c | ||
![]() |
6abf624d12 | ||
![]() |
a6ac54a215 | ||
![]() |
8d8a789c49 | ||
![]() |
5f35710fad | ||
![]() |
6487f0d834 | ||
![]() |
9aea164457 | ||
![]() |
5920a9ad5f | ||
![]() |
a4831cb4a3 | ||
![]() |
ea66004c4a | ||
![]() |
9990b3973b | ||
![]() |
33df10f284 | ||
![]() |
b587f339db | ||
![]() |
c71483c0b3 | ||
![]() |
bce18c9163 | ||
![]() |
d9ff722661 | ||
![]() |
3c3624f3df | ||
![]() |
671f96cd44 | ||
![]() |
011e111d29 | ||
![]() |
201f36d23b | ||
![]() |
cf5fc80c3e | ||
![]() |
14669a939d | ||
![]() |
d3d89f0d28 | ||
![]() |
fc829736e1 | ||
![]() |
b4673c4102 | ||
![]() |
f903558446 | ||
![]() |
e07b4da53d | ||
![]() |
320a01d516 | ||
![]() |
498eb18b82 | ||
![]() |
f9e147b0bf | ||
![]() |
b3ebfecdae | ||
![]() |
b2a30ee8d2 | ||
![]() |
8adace5f2c | ||
![]() |
b58db8b083 | ||
![]() |
001815ed19 | ||
![]() |
7b956ede3f | ||
![]() |
aca9cae309 | ||
![]() |
27a9aed819 | ||
![]() |
c74a7680a4 | ||
![]() |
aa13e839f0 | ||
![]() |
44352f5f7f | ||
![]() |
c0cd9ce5df | ||
![]() |
4b41555ba5 | ||
![]() |
f0d8970435 | ||
![]() |
05f0bfd6c5 | ||
![]() |
afe58ad989 | ||
![]() |
4ee7c325df | ||
![]() |
356a6249d8 | ||
![]() |
071bed8091 | ||
![]() |
fc8974b7aa | ||
![]() |
1737b15937 | ||
![]() |
8f3b8f523e | ||
![]() |
58bb54c38b | ||
![]() |
5c1a7fdbd5 | ||
![]() |
5dea47221a | ||
![]() |
450aaa018d | ||
![]() |
e880c736d6 | ||
![]() |
8da304b997 | ||
![]() |
a3ad450a2e | ||
![]() |
28f1770101 | ||
![]() |
69fb9f3f40 | ||
![]() |
3b10ba6f1b | ||
![]() |
319356e39c | ||
![]() |
c7de919129 | ||
![]() |
6676a7d4ee | ||
![]() |
847e52b9b7 | ||
![]() |
1d53ae2a01 | ||
![]() |
ec95a9cf11 | ||
![]() |
296895f1a9 | ||
![]() |
86f594b19b | ||
![]() |
29bbc9dd4c | ||
![]() |
4625dd751e | ||
![]() |
e057b9fc82 | ||
![]() |
4cafa3ce80 | ||
![]() |
9685c30a23 | ||
![]() |
a492605849 | ||
![]() |
0cd83ebb0e | ||
![]() |
5120bcf9f1 | ||
![]() |
c2048944ff | ||
![]() |
11387985d2 | ||
![]() |
e505cc66a6 | ||
![]() |
4bea498544 | ||
![]() |
32429606bf | ||
![]() |
bbe06e0da1 | ||
![]() |
e0c56efddf | ||
![]() |
83b637fa28 | ||
![]() |
851135bf99 | ||
![]() |
1f39afc8d4 | ||
![]() |
cc4259ed92 | ||
![]() |
f6824b26ae | ||
![]() |
29f06943a1 | ||
![]() |
416d7ddaff | ||
![]() |
b6b5cb5389 | ||
![]() |
f4e721dd51 | ||
![]() |
af9da4a343 | ||
![]() |
fbe9d3dfeb | ||
![]() |
052fa3a34c | ||
![]() |
15b914c8f3 | ||
![]() |
4f8268e38f | ||
![]() |
9e4ffa7032 | ||
![]() |
857fa6b2a3 | ||
![]() |
34da32e7dd | ||
![]() |
6ecd1cd195 | ||
![]() |
a2c6ae6f84 | ||
![]() |
b78e60e7b7 | ||
![]() |
cb322a1168 | ||
![]() |
a40fdbd565 | ||
![]() |
64ae11ab76 | ||
![]() |
cc7e5f489f | ||
![]() |
6bfcefe02f | ||
![]() |
07401c7136 | ||
![]() |
e5055179fd | ||
![]() |
f1e64b5c17 | ||
![]() |
f73183f1a3 | ||
![]() |
7b87d441b0 | ||
![]() |
59de803af9 | ||
![]() |
9f5dee55aa | ||
![]() |
3e4a0099a1 | ||
![]() |
c674edbf27 | ||
![]() |
608217e167 | ||
![]() |
d2bd3c4717 | ||
![]() |
14241402de | ||
![]() |
c764fb24cc | ||
![]() |
57b7a6110e | ||
![]() |
9e307af982 | ||
![]() |
ae558d6b4b | ||
![]() |
a4a8c4feb8 | ||
![]() |
00aaea3645 | ||
![]() |
9d34f6a909 | ||
![]() |
0d15094287 | ||
![]() |
0b9fa4c9bf | ||
![]() |
ef619cc083 | ||
![]() |
4756afe3d5 | ||
![]() |
4caa1f0977 | ||
![]() |
538db6d2e6 | ||
![]() |
2b3b2ecee8 | ||
![]() |
2e6c5fc4e9 | ||
![]() |
2bd88d450e | ||
![]() |
9598b8c415 | ||
![]() |
47793d6a29 | ||
![]() |
3157211849 | ||
![]() |
2320b02c7d | ||
![]() |
d5fbc37119 | ||
![]() |
6b841db2ba | ||
![]() |
b6ed54076a | ||
![]() |
0e7f8a9e52 | ||
![]() |
7134fc3089 | ||
![]() |
c4a1de1ae2 | ||
![]() |
3bcd414b78 | ||
![]() |
dc1fb7000a | ||
![]() |
55244a9bdb | ||
![]() |
2b021e1066 | ||
![]() |
b61c50647b | ||
![]() |
1e8587a479 | ||
![]() |
c5d6df6f2f | ||
![]() |
35d226e05d | ||
![]() |
b9d674c8ad | ||
![]() |
09c39d6df0 | ||
![]() |
6f4220c49e | ||
![]() |
f4c948a9e9 | ||
![]() |
17f83c93cb | ||
![]() |
f800969d35 | ||
![]() |
e4fcc3ad2b | ||
![]() |
b810462028 | ||
![]() |
8a76ee821e | ||
![]() |
02aa70589d | ||
![]() |
2222eae61e | ||
![]() |
3a25ab952b | ||
![]() |
934c8015d5 | ||
![]() |
ce6b1abbb1 | ||
![]() |
54d24e099c | ||
![]() |
6d40d34908 | ||
![]() |
5d9e145c62 | ||
![]() |
3c7c9a8d3f | ||
![]() |
db2e0247ed | ||
![]() |
fd5ee9aebc | ||
![]() |
0baf2ca34c | ||
![]() |
5f5cc45cf0 | ||
![]() |
205cc41556 | ||
![]() |
2cfb4e8e2e | ||
![]() |
2b6cdb5e45 | ||
![]() |
4571f31bd4 | ||
![]() |
7d05f741e7 | ||
![]() |
019d395811 | ||
![]() |
1467dfe3e8 | ||
![]() |
d0cce14364 | ||
![]() |
891ec7a6e4 | ||
![]() |
8457779b34 | ||
![]() |
ad5e8b5073 | ||
![]() |
0d4ccee351 | ||
![]() |
224ff048ef | ||
![]() |
104a472958 | ||
![]() |
76212eeb53 | ||
![]() |
9a74e4c15c | ||
![]() |
b3aaf398e1 | ||
![]() |
4f85c6ffd3 | ||
![]() |
1f4c536fd5 | ||
![]() |
f2c1e7ee78 | ||
![]() |
db0785cbf9 | ||
![]() |
042426ba63 | ||
![]() |
6e3823d37e | ||
![]() |
edd81faff0 | ||
![]() |
e942b3ed81 | ||
![]() |
00c16c1b92 | ||
![]() |
51a22a12ab | ||
![]() |
4d0f742afe | ||
![]() |
ca5b6a74a7 | ||
![]() |
30214b901e | ||
![]() |
c5a13efa9b | ||
![]() |
a0db464187 | ||
![]() |
bc9f9f25bf | ||
![]() |
3788a1ee8e | ||
![]() |
3726f9c38b | ||
![]() |
1c5e415f8c | ||
![]() |
88a1f520d2 | ||
![]() |
f2d8c357ee | ||
![]() |
651a0683ca | ||
![]() |
92f0c91b82 | ||
![]() |
01bd32e0e4 | ||
![]() |
d994622ebf | ||
![]() |
6b6364a7fc | ||
![]() |
cdd2f072af | ||
![]() |
512bc52326 | ||
![]() |
85ebcfceb6 | ||
![]() |
e380960813 | ||
![]() |
f3868fa735 | ||
![]() |
51fde5b865 | ||
![]() |
b4b7e0547d | ||
![]() |
13bab43337 | ||
![]() |
3a238ae762 | ||
![]() |
9d2a05a6dd | ||
![]() |
bb91a1b845 | ||
![]() |
28285f85a1 | ||
![]() |
8b91980e4c | ||
![]() |
1628eb1d43 | ||
![]() |
afc8672387 | ||
![]() |
df85f50b82 | ||
![]() |
de69069fcf | ||
![]() |
9eae8405e8 | ||
![]() |
a7ef8188e2 | ||
![]() |
6a918870ba | ||
![]() |
447fe1c23b | ||
![]() |
b6cc8e00cd | ||
![]() |
36bacd237d | ||
![]() |
1aec7c1a35 | ||
![]() |
0f7ed163cf | ||
![]() |
e03e1eac0b | ||
![]() |
4ad5066e1d | ||
![]() |
861c0ef37b | ||
![]() |
a7dc7600fe | ||
![]() |
4916706cfe | ||
![]() |
17886971ff | ||
![]() |
f4c1a36a45 | ||
![]() |
2b591b3742 | ||
![]() |
aa0f2bdbc2 | ||
![]() |
52f8271fa9 | ||
![]() |
a406ee6d5f | ||
![]() |
24dcda0f4f | ||
![]() |
ed48534718 | ||
![]() |
50a9630cc2 | ||
![]() |
905e6d58aa | ||
![]() |
a4c14fda91 | ||
![]() |
1abb8bd21d | ||
![]() |
83b9826e68 | ||
![]() |
79310994d2 | ||
![]() |
c7706a02ad | ||
![]() |
18a1bbe6e1 | ||
![]() |
40a5217448 | ||
![]() |
123172ae37 | ||
![]() |
f1837377d2 | ||
![]() |
dbf52ec37b | ||
![]() |
4151ea73b7 | ||
![]() |
d6f614a4e1 | ||
![]() |
3e424d0a24 | ||
![]() |
bc5a3ec6df | ||
![]() |
7d22a45196 | ||
![]() |
dd37251c47 | ||
![]() |
f965075749 | ||
![]() |
be0e43b776 | ||
![]() |
f9bfc2ff8e | ||
![]() |
afe6360627 | ||
![]() |
337c0cefdc | ||
![]() |
efe13832dc | ||
![]() |
8a2ecf868f | ||
![]() |
21972b61ec | ||
![]() |
1a918d9be8 | ||
![]() |
39d903aea9 | ||
![]() |
8c66fd798e | ||
![]() |
f1e83cc34a | ||
![]() |
8dbe3f0f51 | ||
![]() |
ba23bd0a40 | ||
![]() |
467e49be70 | ||
![]() |
5d2f86f363 | ||
![]() |
ea42a6caea | ||
![]() |
3758a244cf | ||
![]() |
e26ac7f776 | ||
![]() |
ca70453e84 | ||
![]() |
79b5a39617 | ||
![]() |
f541650828 | ||
![]() |
0f7d882bb7 | ||
![]() |
4d421901e5 | ||
![]() |
2b67d7dee0 | ||
![]() |
925d388e24 | ||
![]() |
3ad8ecb64e | ||
![]() |
b828eaeb45 | ||
![]() |
ee7f1b5946 | ||
![]() |
1fb90a8aa0 | ||
![]() |
6b55ba54ef | ||
![]() |
e9731387f4 | ||
![]() |
97e31dedf0 | ||
![]() |
7dd126a38c | ||
![]() |
9c07aee83b | ||
![]() |
3c2b71ad56 | ||
![]() |
6425327c32 | ||
![]() |
d18b87f38d | ||
![]() |
8a3d1ca183 | ||
![]() |
76282482db | ||
![]() |
9f165d24f0 | ||
![]() |
6bf42ddc79 | ||
![]() |
2f9c6e38b8 | ||
![]() |
169e2bf6bd | ||
![]() |
d7453860a6 | ||
![]() |
43363ab720 | ||
![]() |
8b002362d9 | ||
![]() |
94f84d36a9 | ||
![]() |
98b088dce7 | ||
![]() |
f13aa6fc5b | ||
![]() |
625993dfbb | ||
![]() |
770d0f6177 | ||
![]() |
53531ccebb | ||
![]() |
64035c4a4b | ||
![]() |
ea271fdf26 | ||
![]() |
52023cb725 | ||
![]() |
3fa60e10bc | ||
![]() |
51c914b7fd | ||
![]() |
27047faf28 | ||
![]() |
5656a0c494 | ||
![]() |
e612add051 | ||
![]() |
ee3608f9d3 | ||
![]() |
a167eef548 | ||
![]() |
673bff01ae | ||
![]() |
76c241b091 | ||
![]() |
4ae938698c | ||
![]() |
4f0b67a8db | ||
![]() |
91f2074e5f | ||
![]() |
53c3c271dc |
@@ -4,40 +4,52 @@ Working on bionic
|
||||
What are the big pieces of bionic?
|
||||
----------------------------------
|
||||
|
||||
libc/ --- libc.so, libc.a
|
||||
The C library. Stuff like fopen(3) and kill(2).
|
||||
libm/ --- libm.so, libm.a
|
||||
The math library. Traditionally Unix systems kept stuff like sin(3) and
|
||||
cos(3) in a separate library to save space in the days before shared
|
||||
libraries.
|
||||
libdl/ --- libdl.so
|
||||
The dynamic linker interface library. This is actually just a bunch of
|
||||
stubs that the dynamic linker replaces with pointers to its own
|
||||
implementation at runtime. This is where stuff like dlopen(3) lives.
|
||||
libstdc++/ --- libstdc++.so
|
||||
The C++ ABI support functions. The C++ compiler doesn't know how to
|
||||
implement thread-safe static initialization and the like, so it just calls
|
||||
functions that are supplied by the system. Stuff like __cxa_guard_acquire
|
||||
and __cxa_pure_virtual live here.
|
||||
#### libc/ --- libc.so, libc.a
|
||||
|
||||
linker/ --- /system/bin/linker and /system/bin/linker64
|
||||
The dynamic linker. When you run a dynamically-linked executable, its ELF
|
||||
file has a DT_INTERP entry that says "use the following program to start me".
|
||||
On Android, that's either linker or linker64 (depending on whether it's a
|
||||
32-bit or 64-bit executable). It's responsible for loading the ELF executable
|
||||
into memory and resolving references to symbols (so that when your code tries
|
||||
to jump to fopen(3), say, it lands in the right place).
|
||||
The C library. Stuff like `fopen(3)` and `kill(2)`.
|
||||
|
||||
tests/ --- unit tests
|
||||
The tests/ directory contains unit tests. Roughly arranged as one file per
|
||||
publicly-exported header file.
|
||||
benchmarks/ --- benchmarks
|
||||
The benchmarks/ directory contains benchmarks.
|
||||
#### libm/ --- libm.so, libm.a
|
||||
|
||||
The math library. Traditionally Unix systems kept stuff like `sin(3)` and
|
||||
`cos(3)` in a separate library to save space in the days before shared
|
||||
libraries.
|
||||
|
||||
#### libdl/ --- libdl.so
|
||||
|
||||
The dynamic linker interface library. This is actually just a bunch of stubs
|
||||
that the dynamic linker replaces with pointers to its own implementation at
|
||||
runtime. This is where stuff like `dlopen(3)` lives.
|
||||
|
||||
#### libstdc++/ --- libstdc++.so
|
||||
|
||||
The C++ ABI support functions. The C++ compiler doesn't know how to implement
|
||||
thread-safe static initialization and the like, so it just calls functions that
|
||||
are supplied by the system. Stuff like `__cxa_guard_acquire` and
|
||||
`__cxa_pure_virtual` live here.
|
||||
|
||||
#### linker/ --- /system/bin/linker and /system/bin/linker64
|
||||
|
||||
The dynamic linker. When you run a dynamically-linked executable, its ELF file
|
||||
has a `DT_INTERP` entry that says "use the following program to start me". On
|
||||
Android, that's either `linker` or `linker64` (depending on whether it's a
|
||||
32-bit or 64-bit executable). It's responsible for loading the ELF executable
|
||||
into memory and resolving references to symbols (so that when your code tries to
|
||||
jump to `fopen(3)`, say, it lands in the right place).
|
||||
|
||||
#### tests/ --- unit tests
|
||||
|
||||
The `tests/` directory contains unit tests. Roughly arranged as one file per
|
||||
publicly-exported header file.
|
||||
|
||||
#### benchmarks/ --- benchmarks
|
||||
|
||||
The `benchmarks/` directory contains benchmarks.
|
||||
|
||||
|
||||
What's in libc/?
|
||||
----------------
|
||||
|
||||
<pre>
|
||||
libc/
|
||||
arch-arm/
|
||||
arch-arm64/
|
||||
@@ -81,13 +93,6 @@ libc/
|
||||
private/
|
||||
# These are private header files meant for use within bionic itself.
|
||||
|
||||
stdio/
|
||||
stdlib/
|
||||
unistd/
|
||||
# These are legacy files of unknown provenance. In the past, bionic was a
|
||||
# mess of random versions of random files from all three of FreeBSD, NetBSD,
|
||||
# and OpenBSD! We've been working to clean that up, but these directories
|
||||
# are basically where all the stuff we haven't got to yet lives.
|
||||
dns/
|
||||
# Contains the DNS resolver (originates from NetBSD code).
|
||||
|
||||
@@ -114,6 +119,10 @@ libc/
|
||||
# current upstream source in one of the upstream directories or by
|
||||
# switching the file to C++ and cleaning it up.
|
||||
|
||||
stdio/
|
||||
# These are legacy files of dubious provenance. We're working to clean
|
||||
# this mess up, and this directory should disappear.
|
||||
|
||||
tools/
|
||||
# Various tools used to maintain bionic.
|
||||
|
||||
@@ -124,6 +133,7 @@ libc/
|
||||
zoneinfo/
|
||||
# Android-format time zone data.
|
||||
# See 'Updating tzdata' later.
|
||||
</pre>
|
||||
|
||||
|
||||
Adding system calls
|
||||
@@ -163,3 +173,74 @@ This is fully automated:
|
||||
|
||||
1. Run update-tzdata.py.
|
||||
|
||||
|
||||
Running the tests
|
||||
-----------------
|
||||
|
||||
The tests are all built from the tests/ directory.
|
||||
|
||||
### Device tests
|
||||
|
||||
$ mma
|
||||
$ adb sync
|
||||
$ adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests32
|
||||
$ adb shell \
|
||||
/data/nativetest/bionic-unit-tests-static/bionic-unit-tests-static32
|
||||
# Only for 64-bit targets
|
||||
$ adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests64
|
||||
$ adb shell \
|
||||
/data/nativetest/bionic-unit-tests-static/bionic-unit-tests-static64
|
||||
|
||||
### Host tests
|
||||
|
||||
The host tests require that you have `lunch`ed either an x86 or x86_64 target.
|
||||
|
||||
$ mma
|
||||
# 64-bit tests for 64-bit targets, 32-bit otherwise.
|
||||
$ mm bionic-unit-tests-run-on-host
|
||||
# Only exists for 64-bit targets.
|
||||
$ mm bionic-unit-tests-run-on-host32
|
||||
|
||||
### Against glibc
|
||||
|
||||
As a way to check that our tests do in fact test the correct behavior (and not
|
||||
just the behavior we think is correct), it is possible to run the tests against
|
||||
the host's glibc.
|
||||
|
||||
$ mma
|
||||
$ bionic-unit-tests-glibc32 # already in your path
|
||||
$ bionic-unit-tests-glibc64
|
||||
|
||||
|
||||
Gathering test coverage
|
||||
-----------------------
|
||||
|
||||
For either host or target coverage, you must first:
|
||||
|
||||
* `$ export NATIVE_COVERAGE=true`
|
||||
* Note that the build system is ignorant to this flag being toggled, i.e. if
|
||||
you change this flag, you will have to manually rebuild bionic.
|
||||
* Set `bionic_coverage=true` in `libc/Android.mk` and `libm/Android.mk`.
|
||||
|
||||
### Coverage from device tests
|
||||
|
||||
$ mma
|
||||
$ adb sync
|
||||
$ adb shell \
|
||||
GCOV_PREFIX=/data/local/tmp/gcov \
|
||||
GCOV_PREFIX_STRIP=`echo $ANDROID_BUILD_TOP | grep -o / | wc -l` \
|
||||
/data/nativetest/bionic-unit-tests/bionic-unit-tests32
|
||||
$ acov
|
||||
|
||||
`acov` will pull all coverage information from the device, push it to the right
|
||||
directories, run `lcov`, and open the coverage report in your browser.
|
||||
|
||||
### Coverage from host tests
|
||||
|
||||
First, build and run the host tests as usual (see above).
|
||||
|
||||
$ croot
|
||||
$ lcov -c -d $ANDROID_PRODUCT_OUT -o coverage.info
|
||||
$ genhtml -o covreport coverage.info # or lcov --list coverage.info
|
||||
|
||||
The coverage report is now available at `covreport/index.html`.
|
@@ -49,12 +49,11 @@ LOCAL_MODULE_STEM_64 := bionic-benchmarks64
|
||||
LOCAL_MULTILIB := both
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
||||
LOCAL_CFLAGS += $(benchmark_c_flags)
|
||||
LOCAL_C_INCLUDES += external/stlport/stlport bionic/ bionic/libstdc++/include
|
||||
LOCAL_SHARED_LIBRARIES += libstlport
|
||||
LOCAL_SRC_FILES := $(benchmark_src_files)
|
||||
LOCAL_CXX_STL := libc++
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
ifeq ($(HOST_OS)-$(HOST_ARCH),linux-x86)
|
||||
ifeq ($(HOST_OS)-$(HOST_ARCH),$(filter $(HOST_OS)-$(HOST_ARCH),linux-x86 linux-x86_64))
|
||||
ifeq ($(TARGET_ARCH),x86)
|
||||
LINKER = linker
|
||||
NATIVE_SUFFIX=32
|
||||
|
@@ -20,8 +20,8 @@
|
||||
#include <math.h>
|
||||
|
||||
// Avoid optimization.
|
||||
double d;
|
||||
double v;
|
||||
volatile double d;
|
||||
volatile double v;
|
||||
|
||||
static void BM_math_sqrt(int iters) {
|
||||
StartBenchmarkTiming();
|
||||
|
@@ -28,12 +28,14 @@
|
||||
|
||||
extern void *__system_property_area__;
|
||||
|
||||
// Do not exceed 512, that is about the largest number of properties
|
||||
// that can be created with the current property area size.
|
||||
#define TEST_NUM_PROPS \
|
||||
Arg(1)->Arg(4)->Arg(16)->Arg(64)->Arg(128)->Arg(256)->Arg(512)->Arg(1024)
|
||||
Arg(1)->Arg(4)->Arg(16)->Arg(64)->Arg(128)->Arg(256)->Arg(512)
|
||||
|
||||
struct LocalPropertyTestState {
|
||||
LocalPropertyTestState(int nprops) : nprops(nprops), valid(false) {
|
||||
static const char prop_name_chars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-_";
|
||||
static const char prop_name_chars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_.";
|
||||
|
||||
const char* android_data = getenv("ANDROID_DATA");
|
||||
if (android_data == NULL) {
|
||||
@@ -66,18 +68,38 @@ struct LocalPropertyTestState {
|
||||
srandom(nprops);
|
||||
|
||||
for (int i = 0; i < nprops; i++) {
|
||||
name_lens[i] = random() % PROP_NAME_MAX;
|
||||
// Make sure the name has at least 10 characters to make
|
||||
// it very unlikely to generate the same random name.
|
||||
name_lens[i] = (random() % (PROP_NAME_MAX - 10)) + 10;
|
||||
names[i] = new char[PROP_NAME_MAX + 1];
|
||||
size_t prop_name_len = sizeof(prop_name_chars) - 1;
|
||||
for (int j = 0; j < name_lens[i]; j++) {
|
||||
names[i][j] = prop_name_chars[random() % (sizeof(prop_name_chars) - 1)];
|
||||
if (j == 0 || names[i][j-1] == '.' || j == name_lens[i] - 1) {
|
||||
// Certain values are not allowed:
|
||||
// - Don't start name with '.'
|
||||
// - Don't allow '.' to appear twice in a row
|
||||
// - Don't allow the name to end with '.'
|
||||
// This assumes that '.' is the last character in the
|
||||
// array so that decrementing the length by one removes
|
||||
// the value from the possible values.
|
||||
prop_name_len--;
|
||||
}
|
||||
names[i][j] = prop_name_chars[random() % prop_name_len];
|
||||
}
|
||||
names[i][name_lens[i]] = 0;
|
||||
value_lens[i] = random() % PROP_VALUE_MAX;
|
||||
|
||||
// Make sure the value contains at least 1 character.
|
||||
value_lens[i] = (random() % (PROP_VALUE_MAX - 1)) + 1;
|
||||
values[i] = new char[PROP_VALUE_MAX];
|
||||
for (int j = 0; j < value_lens[i]; j++) {
|
||||
values[i][j] = prop_name_chars[random() % (sizeof(prop_name_chars) - 1)];
|
||||
}
|
||||
__system_property_add(names[i], name_lens[i], values[i], value_lens[i]);
|
||||
|
||||
if (__system_property_add(names[i], name_lens[i], values[i], value_lens[i]) < 0) {
|
||||
printf("Failed to add a property, terminating...\n");
|
||||
printf("%s = %.*s\n", names[i], value_lens[i], values[i]);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
valid = true;
|
||||
|
@@ -105,3 +105,35 @@ static void BM_pthread_mutex_lock_RECURSIVE(int iters) {
|
||||
StopBenchmarkTiming();
|
||||
}
|
||||
BENCHMARK(BM_pthread_mutex_lock_RECURSIVE);
|
||||
|
||||
static void BM_pthread_rw_lock_read(int iters) {
|
||||
StopBenchmarkTiming();
|
||||
pthread_rwlock_t lock;
|
||||
pthread_rwlock_init(&lock, NULL);
|
||||
StartBenchmarkTiming();
|
||||
|
||||
for (int i = 0; i < iters; ++i) {
|
||||
pthread_rwlock_rdlock(&lock);
|
||||
pthread_rwlock_unlock(&lock);
|
||||
}
|
||||
|
||||
StopBenchmarkTiming();
|
||||
pthread_rwlock_destroy(&lock);
|
||||
}
|
||||
BENCHMARK(BM_pthread_rw_lock_read);
|
||||
|
||||
static void BM_pthread_rw_lock_write(int iters) {
|
||||
StopBenchmarkTiming();
|
||||
pthread_rwlock_t lock;
|
||||
pthread_rwlock_init(&lock, NULL);
|
||||
StartBenchmarkTiming();
|
||||
|
||||
for (int i = 0; i < iters; ++i) {
|
||||
pthread_rwlock_wrlock(&lock);
|
||||
pthread_rwlock_unlock(&lock);
|
||||
}
|
||||
|
||||
StopBenchmarkTiming();
|
||||
pthread_rwlock_destroy(&lock);
|
||||
}
|
||||
BENCHMARK(BM_pthread_rw_lock_write);
|
||||
|
@@ -16,32 +16,13 @@
|
||||
|
||||
#include "benchmark.h"
|
||||
|
||||
#include <sys/syscall.h>
|
||||
#include <time.h>
|
||||
|
||||
#if defined(__BIONIC__)
|
||||
|
||||
// Used by the horrible android.text.format.Time class, which is used by Calendar. http://b/8270865.
|
||||
extern "C" void localtime_tz(const time_t* const timep, struct tm* tmp, const char* tz);
|
||||
|
||||
static void BM_time_localtime_tz(int iters) {
|
||||
StartBenchmarkTiming();
|
||||
|
||||
time_t now(time(NULL));
|
||||
tm broken_down_time;
|
||||
for (int i = 0; i < iters; ++i) {
|
||||
localtime_tz(&now, &broken_down_time, "Europe/Berlin");
|
||||
}
|
||||
|
||||
StopBenchmarkTiming();
|
||||
}
|
||||
BENCHMARK(BM_time_localtime_tz);
|
||||
|
||||
#endif
|
||||
|
||||
static void BM_time_clock_gettime(int iters) {
|
||||
StartBenchmarkTiming();
|
||||
|
||||
struct timespec t;
|
||||
timespec t;
|
||||
for (int i = 0; i < iters; ++i) {
|
||||
clock_gettime(CLOCK_MONOTONIC, &t);
|
||||
}
|
||||
@@ -49,3 +30,50 @@ static void BM_time_clock_gettime(int iters) {
|
||||
StopBenchmarkTiming();
|
||||
}
|
||||
BENCHMARK(BM_time_clock_gettime);
|
||||
|
||||
static void BM_time_clock_gettime_syscall(int iters) {
|
||||
StartBenchmarkTiming();
|
||||
|
||||
timespec t;
|
||||
for (int i = 0; i < iters; ++i) {
|
||||
syscall(__NR_clock_gettime, CLOCK_MONOTONIC, &t);
|
||||
}
|
||||
|
||||
StopBenchmarkTiming();
|
||||
}
|
||||
BENCHMARK(BM_time_clock_gettime_syscall);
|
||||
|
||||
static void BM_time_gettimeofday(int iters) {
|
||||
StartBenchmarkTiming();
|
||||
|
||||
timeval tv;
|
||||
for (int i = 0; i < iters; ++i) {
|
||||
gettimeofday(&tv, NULL);
|
||||
}
|
||||
|
||||
StopBenchmarkTiming();
|
||||
}
|
||||
BENCHMARK(BM_time_gettimeofday);
|
||||
|
||||
static void BM_time_gettimeofday_syscall(int iters) {
|
||||
StartBenchmarkTiming();
|
||||
|
||||
timeval tv;
|
||||
for (int i = 0; i < iters; ++i) {
|
||||
syscall(__NR_gettimeofday, &tv, NULL);
|
||||
}
|
||||
|
||||
StopBenchmarkTiming();
|
||||
}
|
||||
BENCHMARK(BM_time_gettimeofday_syscall);
|
||||
|
||||
static void BM_time_time(int iters) {
|
||||
StartBenchmarkTiming();
|
||||
|
||||
for (int i = 0; i < iters; ++i) {
|
||||
time(NULL);
|
||||
}
|
||||
|
||||
StopBenchmarkTiming();
|
||||
}
|
||||
BENCHMARK(BM_time_time);
|
||||
|
227
libc/Android.mk
227
libc/Android.mk
@@ -1,5 +1,7 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
bionic_coverage := false
|
||||
|
||||
# Make everything depend on any changes to included makefiles.
|
||||
libc_common_additional_dependencies := $(LOCAL_PATH)/Android.mk
|
||||
|
||||
@@ -37,38 +39,28 @@ endif
|
||||
# Define the common source files for all the libc instances
|
||||
# =========================================================
|
||||
libc_common_src_files := \
|
||||
bionic/arc4random.c \
|
||||
bionic/bindresvport.c \
|
||||
bionic/daemon.c \
|
||||
bionic/err.c \
|
||||
bionic/ether_aton.c \
|
||||
bionic/ether_ntoa.c \
|
||||
bionic/fts.c \
|
||||
bionic/gethostname.c \
|
||||
bionic/getpriority.c \
|
||||
bionic/getpt.c \
|
||||
bionic/if_indextoname.c \
|
||||
bionic/if_nametoindex.c \
|
||||
bionic/initgroups.c \
|
||||
bionic/ioctl.c \
|
||||
bionic/isatty.c \
|
||||
bionic/memmem.c \
|
||||
bionic/pathconf.c \
|
||||
bionic/ptsname.c \
|
||||
bionic/ptsname_r.c \
|
||||
bionic/pututline.c \
|
||||
bionic/sched_cpualloc.c \
|
||||
bionic/sched_cpucount.c \
|
||||
bionic/semaphore.c \
|
||||
bionic/sigblock.c \
|
||||
bionic/siginterrupt.c \
|
||||
bionic/sigsetmask.c \
|
||||
bionic/system_properties_compat.c \
|
||||
bionic/unlockpt.c \
|
||||
stdio/snprintf.c\
|
||||
stdio/sprintf.c \
|
||||
stdlib/atexit.c \
|
||||
unistd/syslog.c \
|
||||
stdio/stdio_ext.cpp \
|
||||
|
||||
# Fortify implementations of libc functions.
|
||||
libc_common_src_files += \
|
||||
@@ -97,7 +89,7 @@ libc_bionic_src_files := \
|
||||
bionic/access.cpp \
|
||||
bionic/assert.cpp \
|
||||
bionic/atof.cpp \
|
||||
bionic/__bionic_name_mem.cpp \
|
||||
bionic/bionic_systrace.cpp \
|
||||
bionic/bionic_time_conversions.cpp \
|
||||
bionic/brk.cpp \
|
||||
bionic/c16rtomb.cpp \
|
||||
@@ -106,12 +98,11 @@ libc_bionic_src_files := \
|
||||
bionic/chown.cpp \
|
||||
bionic/clearenv.cpp \
|
||||
bionic/clock.cpp \
|
||||
bionic/clock_nanosleep.cpp \
|
||||
bionic/clone.cpp \
|
||||
bionic/__cmsg_nxthdr.cpp \
|
||||
bionic/connect.cpp \
|
||||
bionic/ctype.cpp \
|
||||
bionic/__cxa_guard.cpp \
|
||||
bionic/__cxa_pure_virtual.cpp \
|
||||
bionic/dirent.cpp \
|
||||
bionic/dup2.cpp \
|
||||
bionic/epoll_create.cpp \
|
||||
@@ -127,9 +118,11 @@ libc_bionic_src_files := \
|
||||
bionic/futimens.cpp \
|
||||
bionic/getauxval.cpp \
|
||||
bionic/getcwd.cpp \
|
||||
bionic/getentropy_linux.c \
|
||||
bionic/getpgrp.cpp \
|
||||
bionic/getpid.cpp \
|
||||
bionic/gettid.cpp \
|
||||
bionic/__gnu_basename.cpp \
|
||||
bionic/inotify_init.cpp \
|
||||
bionic/lchown.cpp \
|
||||
bionic/lfs64_support.cpp \
|
||||
@@ -141,6 +134,7 @@ libc_bionic_src_files := \
|
||||
bionic/link.cpp \
|
||||
bionic/locale.cpp \
|
||||
bionic/lstat.cpp \
|
||||
bionic/malloc_info.cpp \
|
||||
bionic/mbrtoc16.cpp \
|
||||
bionic/mbrtoc32.cpp \
|
||||
bionic/mbstate.cpp \
|
||||
@@ -149,11 +143,12 @@ libc_bionic_src_files := \
|
||||
bionic/mknod.cpp \
|
||||
bionic/mntent.cpp \
|
||||
bionic/NetdClientDispatch.cpp \
|
||||
bionic/new.cpp \
|
||||
bionic/open.cpp \
|
||||
bionic/pathconf.cpp \
|
||||
bionic/pause.cpp \
|
||||
bionic/pipe.cpp \
|
||||
bionic/poll.cpp \
|
||||
bionic/posix_fadvise.cpp \
|
||||
bionic/posix_fallocate.cpp \
|
||||
bionic/posix_timers.cpp \
|
||||
bionic/pthread_atfork.cpp \
|
||||
@@ -165,6 +160,7 @@ libc_bionic_src_files := \
|
||||
bionic/pthread_exit.cpp \
|
||||
bionic/pthread_getcpuclockid.cpp \
|
||||
bionic/pthread_getschedparam.cpp \
|
||||
bionic/pthread_gettid_np.cpp \
|
||||
bionic/pthread_internals.cpp \
|
||||
bionic/pthread_join.cpp \
|
||||
bionic/pthread_key.cpp \
|
||||
@@ -177,7 +173,9 @@ libc_bionic_src_files := \
|
||||
bionic/pthread_setschedparam.cpp \
|
||||
bionic/pthread_sigmask.cpp \
|
||||
bionic/ptrace.cpp \
|
||||
bionic/pty.cpp \
|
||||
bionic/raise.cpp \
|
||||
bionic/rand.cpp \
|
||||
bionic/readlink.cpp \
|
||||
bionic/reboot.cpp \
|
||||
bionic/recv.cpp \
|
||||
@@ -186,6 +184,7 @@ libc_bionic_src_files := \
|
||||
bionic/scandir.cpp \
|
||||
bionic/sched_getaffinity.cpp \
|
||||
bionic/sched_getcpu.cpp \
|
||||
bionic/semaphore.cpp \
|
||||
bionic/send.cpp \
|
||||
bionic/setegid.cpp \
|
||||
bionic/__set_errno.cpp \
|
||||
@@ -219,6 +218,7 @@ libc_bionic_src_files := \
|
||||
bionic/stubs.cpp \
|
||||
bionic/symlink.cpp \
|
||||
bionic/sysconf.cpp \
|
||||
bionic/syslog.cpp \
|
||||
bionic/sys_siglist.c \
|
||||
bionic/sys_signame.c \
|
||||
bionic/system_properties.cpp \
|
||||
@@ -229,18 +229,20 @@ libc_bionic_src_files := \
|
||||
bionic/umount.cpp \
|
||||
bionic/unlink.cpp \
|
||||
bionic/utimes.cpp \
|
||||
bionic/vfork.cpp \
|
||||
bionic/vdso.cpp \
|
||||
bionic/wait.cpp \
|
||||
bionic/wchar.cpp \
|
||||
bionic/wctype.cpp \
|
||||
|
||||
libc_cxa_src_files := \
|
||||
bionic/__cxa_guard.cpp \
|
||||
bionic/__cxa_pure_virtual.cpp \
|
||||
bionic/new.cpp \
|
||||
|
||||
libc_upstream_freebsd_src_files := \
|
||||
upstream-freebsd/lib/libc/gen/ldexp.c \
|
||||
upstream-freebsd/lib/libc/gen/sleep.c \
|
||||
upstream-freebsd/lib/libc/gen/usleep.c \
|
||||
upstream-freebsd/lib/libc/stdio/fclose.c \
|
||||
upstream-freebsd/lib/libc/stdio/flags.c \
|
||||
upstream-freebsd/lib/libc/stdio/fopen.c \
|
||||
upstream-freebsd/lib/libc/stdlib/abs.c \
|
||||
upstream-freebsd/lib/libc/stdlib/getopt_long.c \
|
||||
upstream-freebsd/lib/libc/stdlib/imaxabs.c \
|
||||
@@ -282,7 +284,6 @@ libc_upstream_netbsd_src_files := \
|
||||
upstream-netbsd/lib/libc/regex/regerror.c \
|
||||
upstream-netbsd/lib/libc/regex/regexec.c \
|
||||
upstream-netbsd/lib/libc/regex/regfree.c \
|
||||
upstream-netbsd/lib/libc/resolv/mtctxres.c \
|
||||
upstream-netbsd/lib/libc/stdlib/bsearch.c \
|
||||
upstream-netbsd/lib/libc/stdlib/div.c \
|
||||
upstream-netbsd/lib/libc/stdlib/drand48.c \
|
||||
@@ -291,23 +292,16 @@ libc_upstream_netbsd_src_files := \
|
||||
upstream-netbsd/lib/libc/stdlib/ldiv.c \
|
||||
upstream-netbsd/lib/libc/stdlib/lldiv.c \
|
||||
upstream-netbsd/lib/libc/stdlib/lrand48.c \
|
||||
upstream-netbsd/lib/libc/stdlib/lsearch.c \
|
||||
upstream-netbsd/lib/libc/stdlib/mrand48.c \
|
||||
upstream-netbsd/lib/libc/stdlib/nrand48.c \
|
||||
upstream-netbsd/lib/libc/stdlib/_rand48.c \
|
||||
upstream-netbsd/lib/libc/stdlib/rand.c \
|
||||
upstream-netbsd/lib/libc/stdlib/rand_r.c \
|
||||
upstream-netbsd/lib/libc/stdlib/seed48.c \
|
||||
upstream-netbsd/lib/libc/stdlib/srand48.c \
|
||||
upstream-netbsd/lib/libc/stdlib/tdelete.c \
|
||||
upstream-netbsd/lib/libc/stdlib/tfind.c \
|
||||
upstream-netbsd/lib/libc/stdlib/tsearch.c \
|
||||
upstream-netbsd/lib/libc/string/memccpy.c \
|
||||
upstream-netbsd/lib/libc/string/strcasestr.c \
|
||||
upstream-netbsd/lib/libc/string/strcoll.c \
|
||||
upstream-netbsd/lib/libc/string/strxfrm.c \
|
||||
upstream-netbsd/lib/libc/thread-stub/__isthreaded.c \
|
||||
upstream-netbsd/lib/libc/unistd/killpg.c \
|
||||
|
||||
libc_upstream_openbsd_gdtoa_src_files := \
|
||||
upstream-openbsd/android/gdtoa_support.cpp \
|
||||
@@ -337,8 +331,14 @@ libc_upstream_openbsd_gdtoa_src_files_64 := \
|
||||
upstream-openbsd/lib/libc/gdtoa/strtorQ.c \
|
||||
|
||||
libc_upstream_openbsd_src_files := \
|
||||
upstream-openbsd/lib/libc/compat-43/killpg.c \
|
||||
upstream-openbsd/lib/libc/crypt/arc4random.c \
|
||||
upstream-openbsd/lib/libc/crypt/arc4random_uniform.c \
|
||||
upstream-openbsd/lib/libc/gen/alarm.c \
|
||||
upstream-openbsd/lib/libc/gen/ctype_.c \
|
||||
upstream-openbsd/lib/libc/gen/daemon.c \
|
||||
upstream-openbsd/lib/libc/gen/err.c \
|
||||
upstream-openbsd/lib/libc/gen/errx.c \
|
||||
upstream-openbsd/lib/libc/gen/exec.c \
|
||||
upstream-openbsd/lib/libc/gen/fnmatch.c \
|
||||
upstream-openbsd/lib/libc/gen/ftok.c \
|
||||
@@ -348,6 +348,12 @@ libc_upstream_openbsd_src_files := \
|
||||
upstream-openbsd/lib/libc/gen/time.c \
|
||||
upstream-openbsd/lib/libc/gen/tolower_.c \
|
||||
upstream-openbsd/lib/libc/gen/toupper_.c \
|
||||
upstream-openbsd/lib/libc/gen/verr.c \
|
||||
upstream-openbsd/lib/libc/gen/verrx.c \
|
||||
upstream-openbsd/lib/libc/gen/vwarn.c \
|
||||
upstream-openbsd/lib/libc/gen/vwarnx.c \
|
||||
upstream-openbsd/lib/libc/gen/warn.c \
|
||||
upstream-openbsd/lib/libc/gen/warnx.c \
|
||||
upstream-openbsd/lib/libc/locale/btowc.c \
|
||||
upstream-openbsd/lib/libc/locale/mbrlen.c \
|
||||
upstream-openbsd/lib/libc/locale/mbstowcs.c \
|
||||
@@ -381,6 +387,7 @@ libc_upstream_openbsd_src_files := \
|
||||
upstream-openbsd/lib/libc/stdio/asprintf.c \
|
||||
upstream-openbsd/lib/libc/stdio/clrerr.c \
|
||||
upstream-openbsd/lib/libc/stdio/dprintf.c \
|
||||
upstream-openbsd/lib/libc/stdio/fclose.c \
|
||||
upstream-openbsd/lib/libc/stdio/fdopen.c \
|
||||
upstream-openbsd/lib/libc/stdio/feof.c \
|
||||
upstream-openbsd/lib/libc/stdio/ferror.c \
|
||||
@@ -393,6 +400,9 @@ libc_upstream_openbsd_src_files := \
|
||||
upstream-openbsd/lib/libc/stdio/fgetws.c \
|
||||
upstream-openbsd/lib/libc/stdio/fileno.c \
|
||||
upstream-openbsd/lib/libc/stdio/findfp.c \
|
||||
upstream-openbsd/lib/libc/stdio/flags.c \
|
||||
upstream-openbsd/lib/libc/stdio/fmemopen.c \
|
||||
upstream-openbsd/lib/libc/stdio/fopen.c \
|
||||
upstream-openbsd/lib/libc/stdio/fprintf.c \
|
||||
upstream-openbsd/lib/libc/stdio/fpurge.c \
|
||||
upstream-openbsd/lib/libc/stdio/fputc.c \
|
||||
@@ -421,6 +431,8 @@ libc_upstream_openbsd_src_files := \
|
||||
upstream-openbsd/lib/libc/stdio/getwchar.c \
|
||||
upstream-openbsd/lib/libc/stdio/makebuf.c \
|
||||
upstream-openbsd/lib/libc/stdio/mktemp.c \
|
||||
upstream-openbsd/lib/libc/stdio/open_memstream.c \
|
||||
upstream-openbsd/lib/libc/stdio/open_wmemstream.c \
|
||||
upstream-openbsd/lib/libc/stdio/perror.c \
|
||||
upstream-openbsd/lib/libc/stdio/printf.c \
|
||||
upstream-openbsd/lib/libc/stdio/putc.c \
|
||||
@@ -463,11 +475,15 @@ libc_upstream_openbsd_src_files := \
|
||||
upstream-openbsd/lib/libc/stdio/wprintf.c \
|
||||
upstream-openbsd/lib/libc/stdio/wscanf.c \
|
||||
upstream-openbsd/lib/libc/stdio/wsetup.c \
|
||||
upstream-openbsd/lib/libc/stdlib/atexit.c \
|
||||
upstream-openbsd/lib/libc/stdlib/atoi.c \
|
||||
upstream-openbsd/lib/libc/stdlib/atol.c \
|
||||
upstream-openbsd/lib/libc/stdlib/atoll.c \
|
||||
upstream-openbsd/lib/libc/stdlib/exit.c \
|
||||
upstream-openbsd/lib/libc/stdlib/getenv.c \
|
||||
upstream-openbsd/lib/libc/stdlib/insque.c \
|
||||
upstream-openbsd/lib/libc/stdlib/lsearch.c \
|
||||
upstream-openbsd/lib/libc/stdlib/remque.c \
|
||||
upstream-openbsd/lib/libc/stdlib/setenv.c \
|
||||
upstream-openbsd/lib/libc/stdlib/strtoimax.c \
|
||||
upstream-openbsd/lib/libc/stdlib/strtol.c \
|
||||
@@ -476,6 +492,8 @@ libc_upstream_openbsd_src_files := \
|
||||
upstream-openbsd/lib/libc/stdlib/strtoull.c \
|
||||
upstream-openbsd/lib/libc/stdlib/strtoumax.c \
|
||||
upstream-openbsd/lib/libc/stdlib/system.c \
|
||||
upstream-openbsd/lib/libc/stdlib/tfind.c \
|
||||
upstream-openbsd/lib/libc/stdlib/tsearch.c \
|
||||
upstream-openbsd/lib/libc/string/strcasecmp.c \
|
||||
upstream-openbsd/lib/libc/string/strcspn.c \
|
||||
upstream-openbsd/lib/libc/string/strdup.c \
|
||||
@@ -502,7 +520,10 @@ ifneq ($(TARGET_USES_LOGD),false)
|
||||
libc_common_cflags += -DTARGET_USES_LOGD
|
||||
endif
|
||||
|
||||
use_clang := false
|
||||
use_clang := $(USE_CLANG_PLATFORM_BUILD)
|
||||
ifeq ($(use_clang),)
|
||||
use_clang := false
|
||||
endif
|
||||
|
||||
# Try to catch typical 32-bit assumptions that break with 64-bit pointers.
|
||||
libc_common_cflags += \
|
||||
@@ -549,7 +570,6 @@ libc_common_cppflags := \
|
||||
# Define some common includes
|
||||
# ========================================================
|
||||
libc_common_c_includes += \
|
||||
$(LOCAL_PATH)/stdlib \
|
||||
$(LOCAL_PATH)/stdio \
|
||||
|
||||
# ========================================================
|
||||
@@ -583,7 +603,9 @@ LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||
LOCAL_MODULE := libc_stack_protector
|
||||
LOCAL_CLANG := $(use_clang)
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
||||
LOCAL_CXX_STL := none
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
||||
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
@@ -621,7 +643,9 @@ LOCAL_C_INCLUDES := $(libc_common_c_includes) $(LOCAL_PATH)/tzcode/
|
||||
LOCAL_MODULE := libc_tzcode
|
||||
LOCAL_CLANG := $(use_clang)
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
||||
LOCAL_CXX_STL := none
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
||||
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
@@ -637,8 +661,15 @@ LOCAL_SRC_FILES := \
|
||||
$(call all-c-files-under,dns) \
|
||||
upstream-netbsd/lib/libc/isc/ev_streams.c \
|
||||
upstream-netbsd/lib/libc/isc/ev_timers.c \
|
||||
upstream-netbsd/lib/libc/resolv/mtctxres.c \
|
||||
|
||||
LOCAL_CFLAGS := \
|
||||
# We use the OpenBSD res_random.
|
||||
LOCAL_CFLAGS += \
|
||||
-Dres_randomid=__res_randomid
|
||||
LOCAL_SRC_FILES += \
|
||||
upstream-openbsd/lib/libc/net/res_random.c \
|
||||
|
||||
LOCAL_CFLAGS += \
|
||||
$(libc_common_cflags) \
|
||||
-DANDROID_CHANGES \
|
||||
-DINET6 \
|
||||
@@ -656,7 +687,9 @@ LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||
LOCAL_MODULE := libc_dns
|
||||
LOCAL_CLANG := $(use_clang)
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
||||
LOCAL_CXX_STL := none
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
||||
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
@@ -685,9 +718,12 @@ LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||
LOCAL_MODULE := libc_freebsd
|
||||
LOCAL_CLANG := $(use_clang)
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
||||
LOCAL_CXX_STL := none
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
||||
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_freebsd_src_files))
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
|
||||
@@ -715,7 +751,9 @@ LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||
LOCAL_MODULE := libc_netbsd
|
||||
LOCAL_CLANG := $(use_clang)
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
||||
LOCAL_CXX_STL := none
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
||||
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_netbsd_src_files))
|
||||
@@ -732,9 +770,20 @@ include $(BUILD_STATIC_LIBRARY)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := $(libc_upstream_openbsd_src_files)
|
||||
ifneq (,$(filter $(TARGET_ARCH),x86 x86_64))
|
||||
# Clang has wrong long double size or LDBL_MANT_DIG, http://b/17163651.
|
||||
LOCAL_CLANG := false
|
||||
else
|
||||
LOCAL_CLANG := $(use_clang)
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS := \
|
||||
$(libc_common_cflags) \
|
||||
-Wno-sign-compare -Wno-uninitialized -Wno-unused-parameter \
|
||||
-Wno-missing-field-initializers \
|
||||
-Wno-sign-compare \
|
||||
-Wno-uninitialized \
|
||||
-Wno-unused-parameter \
|
||||
-I$(LOCAL_PATH)/private \
|
||||
-I$(LOCAL_PATH)/upstream-openbsd/android/include \
|
||||
-I$(LOCAL_PATH)/upstream-openbsd/lib/libc/include \
|
||||
-I$(LOCAL_PATH)/upstream-openbsd/lib/libc/gdtoa/ \
|
||||
@@ -744,11 +793,13 @@ LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
||||
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||
LOCAL_MODULE := libc_openbsd
|
||||
LOCAL_CLANG := $(use_clang)
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
||||
LOCAL_CXX_STL := none
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
||||
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_openbsd_src_files))
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
|
||||
@@ -763,10 +814,18 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES_32 := $(libc_upstream_openbsd_gdtoa_src_files_32)
|
||||
LOCAL_SRC_FILES_64 := $(libc_upstream_openbsd_gdtoa_src_files_64)
|
||||
ifneq (,$(filter $(TARGET_ARCH),x86 x86_64))
|
||||
# Clang has wrong long double size or LDBL_MANT_DIG, http://b/17163651.
|
||||
LOCAL_CLANG := false
|
||||
else
|
||||
LOCAL_CLANG := $(use_clang)
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS := \
|
||||
$(libc_common_cflags) \
|
||||
-Wno-sign-compare -Wno-uninitialized \
|
||||
-fvisibility=hidden \
|
||||
-I$(LOCAL_PATH)/private \
|
||||
-I$(LOCAL_PATH)/upstream-openbsd/android/include \
|
||||
-I$(LOCAL_PATH)/upstream-openbsd/lib/libc/include \
|
||||
-include openbsd-compat.h \
|
||||
@@ -775,9 +834,10 @@ LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
||||
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||
LOCAL_MODULE := libc_gdtoa
|
||||
LOCAL_CLANG := $(use_clang)
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
||||
LOCAL_CXX_STL := none
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
||||
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
@@ -793,19 +853,49 @@ LOCAL_SRC_FILES := $(libc_bionic_src_files)
|
||||
LOCAL_CFLAGS := $(libc_common_cflags) \
|
||||
-Wframe-larger-than=2048 \
|
||||
|
||||
ifeq ($(TARGET_ARCH),x86_64)
|
||||
# Clang assembler has problem with ssse3-strcmp-slm.S, http://b/17302991
|
||||
LOCAL_CLANG_ASFLAGS += -no-integrated-as
|
||||
endif
|
||||
|
||||
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
||||
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||
LOCAL_C_INCLUDES := $(libc_common_c_includes) bionic/libstdc++/include
|
||||
LOCAL_MODULE := libc_bionic
|
||||
LOCAL_CLANG := $(use_clang)
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
||||
LOCAL_CXX_STL := none
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
||||
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_bionic_src_files))
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
|
||||
# ========================================================
|
||||
# libc_cxa.a - Things traditionally in libstdc++
|
||||
# ========================================================
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := $(libc_cxa_src_files)
|
||||
LOCAL_CFLAGS := $(libc_common_cflags) \
|
||||
-fvisibility=hidden \
|
||||
|
||||
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
||||
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
||||
LOCAL_C_INCLUDES := $(libc_common_c_includes) bionic/libstdc++/include
|
||||
LOCAL_MODULE := libc_cxa
|
||||
LOCAL_CLANG := true # GCC refuses to hide new/delete
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
||||
LOCAL_CXX_STL := none
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
|
||||
# ========================================================
|
||||
# libc_syscalls.a
|
||||
# ========================================================
|
||||
@@ -819,7 +909,9 @@ endif
|
||||
LOCAL_MODULE := libc_syscalls
|
||||
LOCAL_CLANG := $(use_clang)
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
||||
LOCAL_CXX_STL := none
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
@@ -838,7 +930,9 @@ LOCAL_MODULE := libc_aeabi
|
||||
LOCAL_CLANG := $(use_clang)
|
||||
LOCAL_CFLAGS := $(libc_common_cflags) -fno-builtin
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
||||
LOCAL_CXX_STL := none
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
@@ -858,6 +952,7 @@ LOCAL_CLANG := $(use_clang)
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := \
|
||||
libc_bionic \
|
||||
libc_cxa \
|
||||
libc_dns \
|
||||
libc_freebsd \
|
||||
libc_gdtoa \
|
||||
@@ -874,10 +969,12 @@ ifneq ($(MALLOC_IMPL),dlmalloc)
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES += libjemalloc
|
||||
endif
|
||||
|
||||
LOCAL_CXX_STL := none
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
|
||||
# TODO: split out the asflags.
|
||||
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
|
||||
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
||||
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_common_src_files))
|
||||
@@ -913,7 +1010,9 @@ LOCAL_MODULE := libc_nomalloc
|
||||
LOCAL_CLANG := $(use_clang)
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
|
||||
LOCAL_CXX_STL := none
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
||||
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_static_src_files))
|
||||
@@ -934,6 +1033,8 @@ LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||
LOCAL_MODULE := libc_malloc
|
||||
LOCAL_CLANG := $(use_clang)
|
||||
LOCAL_CXX_STL := none
|
||||
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
@@ -959,7 +1060,9 @@ LOCAL_MODULE := libc
|
||||
LOCAL_CLANG := $(use_clang)
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
|
||||
LOCAL_CXX_STL := none
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
||||
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_static_src_files))
|
||||
@@ -979,8 +1082,6 @@ LOCAL_SRC_FILES := \
|
||||
$(libc_arch_dynamic_src_files) \
|
||||
$(libc_static_common_src_files) \
|
||||
bionic/malloc_debug_common.cpp \
|
||||
bionic/debug_mapinfo.cpp \
|
||||
bionic/debug_stacktrace.cpp \
|
||||
bionic/libc_init_dynamic.cpp \
|
||||
bionic/NetdClient.cpp \
|
||||
|
||||
@@ -1003,6 +1104,7 @@ LOCAL_STRIP_MODULE := keep_symbols
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdl
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
|
||||
LOCAL_CXX_STL := none
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
|
||||
# We'd really like to do this for all architectures, but since this wasn't done
|
||||
@@ -1022,6 +1124,7 @@ LOCAL_SRC_FILES_arm += \
|
||||
arch-common/bionic/crtbegin_so.c \
|
||||
arch-arm/bionic/atexit_legacy.c \
|
||||
arch-common/bionic/crtend_so.S
|
||||
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
@@ -1039,14 +1142,13 @@ ifneq ($(TARGET_BUILD_VARIANT),user)
|
||||
# ========================================================
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_CFLAGS := \
|
||||
$(libc_common_cflags) \
|
||||
-DMALLOC_LEAK_CHECK \
|
||||
|
||||
LOCAL_CFLAGS := $(libc_common_cflags)
|
||||
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
||||
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
||||
|
||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||
# Make sure that unwind.h comes from libunwind.
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(libc_common_c_includes) \
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
bionic/debug_mapinfo.cpp \
|
||||
@@ -1060,11 +1162,16 @@ LOCAL_CLANG := $(use_clang)
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libc libdl
|
||||
LOCAL_CXX_STL := none
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
# Only need this for arm since libc++ uses its own unwind code that
|
||||
# doesn't mix with the other default unwind code.
|
||||
LOCAL_STATIC_LIBRARIES_arm := libunwind_llvm
|
||||
LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
|
||||
|
||||
# Don't install on release build
|
||||
LOCAL_MODULE_TAGS := eng debug
|
||||
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
||||
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
@@ -1093,16 +1200,54 @@ LOCAL_CLANG := $(use_clang)
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libc libdl
|
||||
LOCAL_CXX_STL := none
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
|
||||
# Don't install on release build
|
||||
LOCAL_MODULE_TAGS := eng debug
|
||||
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
||||
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
endif #!user
|
||||
|
||||
# ========================================================
|
||||
# libstdc++.so
|
||||
# ========================================================
|
||||
libstdcxx_common_src_files := \
|
||||
bionic/__cxa_guard.cpp \
|
||||
bionic/__cxa_pure_virtual.cpp \
|
||||
bionic/new.cpp \
|
||||
bionic/libc_logging.cpp \
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_C_INCLUDES := $(libc_common_c_includes) bionic/libstdc++/include
|
||||
LOCAL_CFLAGS := $(libc_common_cflags)
|
||||
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
||||
LOCAL_SRC_FILES := $(libstdcxx_common_src_files)
|
||||
LOCAL_MODULE:= libstdc++
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
||||
LOCAL_CXX_STL := none
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES := libc
|
||||
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
# ========================================================
|
||||
# libstdc++.a
|
||||
# ========================================================
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_C_INCLUDES := $(libc_common_c_includes) bionic/libstdc++/include
|
||||
LOCAL_CFLAGS := $(libc_common_cflags)
|
||||
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
||||
LOCAL_SRC_FILES := $(libstdcxx_common_src_files)
|
||||
LOCAL_MODULE:= libstdc++
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
||||
LOCAL_CXX_STL := none
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES := libc
|
||||
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
|
||||
# ========================================================
|
||||
include $(call all-makefiles-under,$(LOCAL_PATH))
|
||||
|
475
libc/NOTICE
475
libc/NOTICE
@@ -3,12 +3,12 @@
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
Redistributions of source code must retain the above copyright
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
Neither the name of the Linaro nor the
|
||||
* Neither the name of the Linaro nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
@@ -34,12 +34,12 @@
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
Redistributions of source code must retain the above copyright
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
Neither the name of the company nor the names of its contributors
|
||||
* Neither the name of the company nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
@@ -55,6 +55,34 @@
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1993 John Brezak
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. The name of the author may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
====================================================
|
||||
@@ -184,9 +212,9 @@ All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
Redistributions of source code must retain the above copyright
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
@@ -228,9 +256,9 @@ All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
Redistributions of source code must retain the above copyright
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
@@ -257,9 +285,9 @@ Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
Redistributions of source code must retain the above copyright
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
@@ -285,9 +313,9 @@ All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
Redistributions of source code must retain the above copyright
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
@@ -329,9 +357,9 @@ All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
Redistributions of source code must retain the above copyright
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
@@ -373,9 +401,9 @@ All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
Redistributions of source code must retain the above copyright
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
@@ -448,9 +476,9 @@ All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
Redistributions of source code must retain the above copyright
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
@@ -492,9 +520,9 @@ All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
Redistributions of source code must retain the above copyright
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
@@ -536,9 +564,9 @@ All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
Redistributions of source code must retain the above copyright
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
@@ -565,9 +593,9 @@ Copyright (c) 2013-2014 NVIDIA Corporation. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
Redistributions of source code must retain the above copyright
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
@@ -594,9 +622,9 @@ All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
Redistributions of source code must retain the above copyright
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
@@ -638,9 +666,9 @@ All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
Redistributions of source code must retain the above copyright
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
@@ -804,35 +832,6 @@ SUCH DAMAGE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1983, 1988, 1993
|
||||
The Regents of the University of California. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the University nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1983, 1989
|
||||
The Regents of the University of California. All rights reserved.
|
||||
|
||||
@@ -2511,35 +2510,6 @@ SUCH DAMAGE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1993
|
||||
The Regents of the University of California. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the University nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1993
|
||||
The Regents of the University of California. All rights reserved.
|
||||
|
||||
@@ -3132,67 +3102,6 @@ SUCH DAMAGE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1999 Kungliga Tekniska Högskolan
|
||||
(Royal Institute of Technology, Stockholm, Sweden).
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of KTH nor the names of its contributors may be
|
||||
used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY KTH AND ITS CONTRIBUTORS ``AS IS'' AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KTH OR ITS CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
All rights reserved.
|
||||
|
||||
This code is derived from software contributed to The NetBSD Foundation
|
||||
by Michael Graff.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2000 Ben Harris.
|
||||
Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
All rights reserved.
|
||||
@@ -4132,6 +4041,22 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2008, Damien Miller <djm@openbsd.org>
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2009
|
||||
MIPS Technologies, Inc., California.
|
||||
|
||||
@@ -4253,13 +4178,13 @@ Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with
|
||||
the distribution.
|
||||
Neither the name of MIPS Technologies Inc. nor the names of its
|
||||
* Neither the name of MIPS Technologies Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
@@ -4299,16 +4224,16 @@ All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
|
||||
Neither the name of Intel Corporation nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
* Neither the name of Intel Corporation nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
@@ -4329,16 +4254,16 @@ All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
|
||||
Neither the name of Intel Corporation nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
* Neither the name of Intel Corporation nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
@@ -4412,16 +4337,16 @@ All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
|
||||
Neither the name of Intel Corporation nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
* Neither the name of Intel Corporation nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
@@ -4436,6 +4361,39 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2011 Martin Pieuchot <mpi@openbsd.org>
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2011 Martin Pieuchot <mpi@openbsd.org>
|
||||
Copyright (c) 2009 Ted Unangst
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2011 The Android Open Source Project
|
||||
Copyright (c) 2008 ARM Ltd
|
||||
All rights reserved.
|
||||
@@ -4471,16 +4429,16 @@ All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
|
||||
Neither the name of Intel Corporation nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
* Neither the name of Intel Corporation nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
@@ -4501,16 +4459,16 @@ All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
|
||||
Neither the name of Intel Corporation nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
* Neither the name of Intel Corporation nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
@@ -4530,12 +4488,12 @@ All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
Redistributions of source code must retain the above copyright
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
Neither the name of the VMware, Inc. nor the names of its contributors
|
||||
* Neither the name of the VMware, Inc. nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
@@ -4557,12 +4515,12 @@ Copyright (c) 2012, Linaro Limited
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
Redistributions of source code must retain the above copyright
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
Neither the name of the Linaro nor the
|
||||
* Neither the name of the Linaro nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
@@ -4586,12 +4544,12 @@ Copyright (c) 2012, Linaro Limited
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
Redistributions of source code must retain the above copyright
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
Neither the name of the Linaro nor the
|
||||
* Neither the name of the Linaro nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
@@ -4660,14 +4618,14 @@ Copyright (c) 2013, Linaro Limited
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
Neither the name of Linaro Limited nor the names of its
|
||||
* Neither the name of Linaro Limited nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
@@ -4685,22 +4643,42 @@ Copyright (c) 2013, Linaro Limited
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org>
|
||||
Copyright (c) 2014 Bob Beck <beck@obtuse.com>
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
Emulation of getentropy(2) as documented at:
|
||||
http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/getentropy.2
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2014, Intel Corporation
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
|
||||
Neither the name of Intel Corporation nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
* Neither the name of Intel Corporation nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
@@ -4720,12 +4698,12 @@ Copyright (c) 2014, Linaro Limited
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
Redistributions of source code must retain the above copyright
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
Neither the name of the Linaro nor the
|
||||
* Neither the name of the Linaro nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
@@ -4847,6 +4825,42 @@ SUCH DAMAGE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
|
||||
Copyright 2008 Damien Miller <djm@openbsd.org>
|
||||
All rights reserved.
|
||||
|
||||
Theo de Raadt <deraadt@openbsd.org> came up with the idea of using
|
||||
such a mathematical system to generate more random (yet non-repeating)
|
||||
ids to solve the resolver/named problem. But Niels designed the
|
||||
actual system based on the constraints.
|
||||
|
||||
Later modified by Damien Miller to wrap the LCG output in a 15-bit
|
||||
permutation generator based on a Luby-Rackoff block cipher. This
|
||||
ensures the output is non-repeating and preserves the MSB twiddle
|
||||
trick, but makes it more resistant to LCG prediction.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Copyright 2000 David E. O'Brien, John D. Polstra.
|
||||
All rights reserved.
|
||||
|
||||
@@ -5149,3 +5163,34 @@ THIS SOFTWARE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
memchr - find a character in a memory zone
|
||||
|
||||
Copyright (c) 2014, ARM Limited
|
||||
All rights Reserved.
|
||||
Copyright (c) 2014, Linaro Ltd.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the company nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
|
@@ -77,12 +77,11 @@ int prlimit64(pid_t, int, struct rlimit64*, const struct rlimit64*) arm,mips,x8
|
||||
int setgroups:setgroups32(int, const gid_t*) arm,x86
|
||||
int setgroups:setgroups(int, const gid_t*) arm64,mips,mips64,x86_64
|
||||
int setpgid(pid_t, pid_t) all
|
||||
pid_t vfork(void) arm
|
||||
int setregid:setregid32(gid_t, gid_t) arm,x86
|
||||
int setregid:setregid(gid_t, gid_t) arm64,mips,mips64,x86_64
|
||||
int chroot(const char*) all
|
||||
# IMPORTANT: Even though <sys/prctl.h> declares prctl(int, ...), the syscall stub must take 6 arguments
|
||||
# to match the kernel implementation.
|
||||
int prctl(int option, unsigned int arg2, unsigned int arg3, unsigned int arg4, unsigned int arg5) all
|
||||
int prctl(int, unsigned long, unsigned long, unsigned long, unsigned long) all
|
||||
long __arch_prctl:arch_prctl(int, unsigned long) x86_64
|
||||
int capget(cap_user_header_t header, cap_user_data_t data) all
|
||||
int capset(cap_user_header_t header, const cap_user_data_t data) all
|
||||
@@ -168,6 +167,12 @@ void* mmap|mmap64(void*, size_t, int, int, int, off_t) arm64,mips64,x86_64
|
||||
int fallocate64:fallocate(int, int, off64_t, off64_t) arm,mips,x86
|
||||
int fallocate|fallocate64(int, int, off_t, off_t) arm64,mips64,x86_64
|
||||
|
||||
# posix_fadvise64 is awkward: arm has shuffled arguments,
|
||||
# the POSIX functions don't set errno, and no architecture has posix_fadvise.
|
||||
int __arm_fadvise64_64:arm_fadvise64_64(int, int, off64_t, off64_t) arm
|
||||
int __fadvise64:fadvise64_64(int, off64_t, off64_t, int) x86
|
||||
int __fadvise64:fadvise64(int, off64_t, off64_t, int) arm64,mips,mips64,x86_64
|
||||
|
||||
int __fstatfs64:fstatfs64(int, size_t, struct statfs*) arm,mips,x86
|
||||
int fstatfs64|fstatfs:fstatfs(int, struct statfs*) arm64,mips64,x86_64
|
||||
int __statfs64:statfs64(const char*, size_t, struct statfs*) arm,mips,x86
|
||||
@@ -194,14 +199,12 @@ int swapon(const char*, int) all
|
||||
int swapoff(const char*) all
|
||||
|
||||
# time
|
||||
int gettimeofday(struct timeval*, struct timezone*) all
|
||||
int settimeofday(const struct timeval*, const struct timezone*) all
|
||||
clock_t times(struct tms*) all
|
||||
int nanosleep(const struct timespec*, struct timespec*) all
|
||||
int clock_gettime(clockid_t clk_id, struct timespec* tp) all
|
||||
int clock_settime(clockid_t clk_id, const struct timespec* tp) all
|
||||
int clock_getres(clockid_t clk_id, struct timespec* res) all
|
||||
int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec* req, struct timespec* rem) all
|
||||
int clock_settime(clockid_t, const struct timespec*) all
|
||||
int clock_getres(clockid_t, struct timespec*) all
|
||||
int __clock_nanosleep:clock_nanosleep(clockid_t, int, const struct timespec*, struct timespec*) all
|
||||
int getitimer(int, const struct itimerval*) all
|
||||
int setitimer(int, const struct itimerval*, struct itimerval*) all
|
||||
int __timer_create:timer_create(clockid_t clockid, struct sigevent* evp, __kernel_timer_t* timerid) all
|
||||
@@ -307,6 +310,9 @@ int __ppoll:ppoll(pollfd*, unsigned int, timespec*, const sigset_t*, size_t) al
|
||||
|
||||
int __set_tid_address:set_tid_address(int*) all
|
||||
|
||||
int setfsgid(gid_t) all
|
||||
int setfsuid(uid_t) all
|
||||
|
||||
pid_t wait4(pid_t, int*, int, struct rusage*) all
|
||||
int __waitid:waitid(int, pid_t, struct siginfo_t*, int, void*) all
|
||||
|
||||
@@ -315,8 +321,14 @@ int __set_tls:__ARM_NR_set_tls(void*) arm
|
||||
int cacheflush:__ARM_NR_cacheflush(long start, long end, long flags) arm
|
||||
|
||||
# MIPS-specific
|
||||
int _flush_cache:cacheflush(char* addr, const int nbytes, const int op) mips,mips64
|
||||
int _flush_cache:cacheflush(char* addr, const int nbytes, const int op) mips
|
||||
int __set_tls:set_thread_area(void*) mips,mips64
|
||||
|
||||
# x86-specific
|
||||
int __set_thread_area:set_thread_area(void*) x86
|
||||
|
||||
# vdso stuff.
|
||||
int clock_gettime(clockid_t, timespec*) arm,mips,mips64,x86
|
||||
int __clock_gettime:clock_gettime(clockid_t, timespec*) arm64,x86_64
|
||||
int gettimeofday(timeval*, timezone*) arm,mips,mips64,x86
|
||||
int __gettimeofday:gettimeofday(timeval*, timezone*) arm64,x86_64
|
||||
|
@@ -1,22 +1,35 @@
|
||||
# arm specific configs
|
||||
# 32-bit arm.
|
||||
|
||||
# These are used by the 32-bit targets, but not the 64-bit ones.
|
||||
libc_common_src_files_arm := \
|
||||
#
|
||||
# Various kinds of LP32 cruft.
|
||||
#
|
||||
|
||||
libc_bionic_src_files_arm += \
|
||||
bionic/mmap.cpp \
|
||||
|
||||
libc_common_src_files_arm += \
|
||||
bionic/legacy_32_bit_support.cpp \
|
||||
bionic/ndk_cruft.cpp \
|
||||
bionic/time64.c \
|
||||
|
||||
libc_netbsd_src_files_arm += \
|
||||
upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
|
||||
|
||||
libc_openbsd_src_files_arm += \
|
||||
upstream-openbsd/lib/libc/stdio/putw.c \
|
||||
|
||||
# These are shared by all the 32-bit targets, but not the 64-bit ones.
|
||||
libc_bionic_src_files_arm := \
|
||||
bionic/mmap.cpp
|
||||
#
|
||||
# Default implementations of functions that are commonly optimized.
|
||||
#
|
||||
|
||||
libc_common_src_files_arm += \
|
||||
libc_bionic_src_files_arm += \
|
||||
bionic/memchr.c \
|
||||
bionic/memrchr.c \
|
||||
bionic/strchr.cpp \
|
||||
bionic/strnlen.c \
|
||||
bionic/strrchr.cpp \
|
||||
|
||||
libc_freebsd_src_files_arm += \
|
||||
upstream-freebsd/lib/libc/string/wcscat.c \
|
||||
upstream-freebsd/lib/libc/string/wcschr.c \
|
||||
upstream-freebsd/lib/libc/string/wcscmp.c \
|
||||
@@ -25,8 +38,9 @@ libc_common_src_files_arm += \
|
||||
upstream-freebsd/lib/libc/string/wcsrchr.c \
|
||||
upstream-freebsd/lib/libc/string/wmemcmp.c \
|
||||
upstream-freebsd/lib/libc/string/wmemmove.c \
|
||||
|
||||
libc_openbsd_src_files_arm += \
|
||||
upstream-openbsd/lib/libc/string/bcopy.c \
|
||||
upstream-openbsd/lib/libc/string/stpcpy.c \
|
||||
upstream-openbsd/lib/libc/string/stpncpy.c \
|
||||
upstream-openbsd/lib/libc/string/strlcat.c \
|
||||
upstream-openbsd/lib/libc/string/strlcpy.c \
|
||||
@@ -34,28 +48,18 @@ libc_common_src_files_arm += \
|
||||
upstream-openbsd/lib/libc/string/strncmp.c \
|
||||
upstream-openbsd/lib/libc/string/strncpy.c \
|
||||
|
||||
# The C++ fortify function implementations for which there is an
|
||||
# arm assembler version.
|
||||
#
|
||||
# Fortify implementations of libc functions.
|
||||
# libc_common_src_files_arm +=
|
||||
# bionic/__memcpy_chk.cpp \
|
||||
# bionic/__memset_chk.cpp \
|
||||
# bionic/__strcpy_chk.cpp \
|
||||
# bionic/__strcat_chk.cpp \
|
||||
# Inherently architecture-specific code.
|
||||
#
|
||||
|
||||
libc_common_cflags_arm := -DSOFTFLOAT
|
||||
|
||||
##########################################
|
||||
### CPU specific source files
|
||||
libc_bionic_src_files_arm += \
|
||||
arch-arm/bionic/abort_arm.S \
|
||||
arch-arm/bionic/atomics_arm.c \
|
||||
arch-arm/bionic/__bionic_clone.S \
|
||||
arch-arm/bionic/_exit_with_stack_teardown.S \
|
||||
arch-arm/bionic/__get_sp.S \
|
||||
arch-arm/bionic/libgcc_compat.c \
|
||||
arch-arm/bionic/memcmp.S \
|
||||
arch-arm/bionic/__restore.S \
|
||||
arch-arm/bionic/_setjmp.S \
|
||||
arch-arm/bionic/setjmp.S \
|
||||
arch-arm/bionic/sigsetjmp.S \
|
||||
@@ -64,9 +68,6 @@ libc_bionic_src_files_arm += \
|
||||
libc_arch_static_src_files_arm := arch-arm/bionic/exidx_static.c
|
||||
libc_arch_dynamic_src_files_arm := arch-arm/bionic/exidx_dynamic.c
|
||||
|
||||
libc_netbsd_src_files_arm := \
|
||||
upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
|
||||
|
||||
## CPU variant specific source files
|
||||
ifeq ($(strip $(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)),)
|
||||
$(warning TARGET_$(my_2nd_arch_prefix)ARCH is arm, but TARGET_$(my_2nd_arch_prefix)CPU_VARIANT is not defined)
|
||||
|
@@ -39,6 +39,9 @@
|
||||
|
||||
extern int __cxa_atexit(void (*)(void*), void*, void*);
|
||||
|
||||
// All of these are weak symbols to avoid multiple definition errors when
|
||||
// linking with libstdc++-v3 or compiler-rt.
|
||||
|
||||
/* The "C++ ABI for ARM" document states that static C++ constructors,
|
||||
* which are called from the .init_array, should manually call
|
||||
* __aeabi_atexit() to register static destructors explicitly.
|
||||
@@ -47,35 +50,35 @@ extern int __cxa_atexit(void (*)(void*), void*, void*);
|
||||
* variable from the shared object that contains the constructor/destructor
|
||||
*/
|
||||
|
||||
// Make this a weak symbol to avoid a multiple definition error when linking with libstdc++-v3.
|
||||
int __attribute__((weak))
|
||||
__aeabi_atexit(void *object, void (*destructor) (void *), void *dso_handle) {
|
||||
return __cxa_atexit(destructor, object, dso_handle);
|
||||
}
|
||||
|
||||
|
||||
void __aeabi_memcpy8(void *dest, const void *src, size_t n) {
|
||||
void __attribute__((weak))
|
||||
__aeabi_memcpy8(void *dest, const void *src, size_t n) {
|
||||
memcpy(dest, src, n);
|
||||
}
|
||||
|
||||
void __aeabi_memcpy4(void *dest, const void *src, size_t n) {
|
||||
void __attribute__((weak)) __aeabi_memcpy4(void *dest, const void *src, size_t n) {
|
||||
memcpy(dest, src, n);
|
||||
}
|
||||
|
||||
void __aeabi_memcpy(void *dest, const void *src, size_t n) {
|
||||
void __attribute__((weak)) __aeabi_memcpy(void *dest, const void *src, size_t n) {
|
||||
memcpy(dest, src, n);
|
||||
}
|
||||
|
||||
|
||||
void __aeabi_memmove8(void *dest, const void *src, size_t n) {
|
||||
void __attribute__((weak)) __aeabi_memmove8(void *dest, const void *src, size_t n) {
|
||||
memmove(dest, src, n);
|
||||
}
|
||||
|
||||
void __aeabi_memmove4(void *dest, const void *src, size_t n) {
|
||||
void __attribute__((weak)) __aeabi_memmove4(void *dest, const void *src, size_t n) {
|
||||
memmove(dest, src, n);
|
||||
}
|
||||
|
||||
void __aeabi_memmove(void *dest, const void *src, size_t n) {
|
||||
void __attribute__((weak)) __aeabi_memmove(void *dest, const void *src, size_t n) {
|
||||
memmove(dest, src, n);
|
||||
}
|
||||
|
||||
@@ -84,27 +87,27 @@ void __aeabi_memmove(void *dest, const void *src, size_t n) {
|
||||
* This allows __aeabi_memclr to tail-call __aeabi_memset
|
||||
*/
|
||||
|
||||
void __aeabi_memset8(void *dest, size_t n, int c) {
|
||||
void __attribute__((weak)) __aeabi_memset8(void *dest, size_t n, int c) {
|
||||
memset(dest, c, n);
|
||||
}
|
||||
|
||||
void __aeabi_memset4(void *dest, size_t n, int c) {
|
||||
void __attribute__((weak)) __aeabi_memset4(void *dest, size_t n, int c) {
|
||||
memset(dest, c, n);
|
||||
}
|
||||
|
||||
void __aeabi_memset(void *dest, size_t n, int c) {
|
||||
void __attribute__((weak)) __aeabi_memset(void *dest, size_t n, int c) {
|
||||
memset(dest, c, n);
|
||||
}
|
||||
|
||||
|
||||
void __aeabi_memclr8(void *dest, size_t n) {
|
||||
void __attribute__((weak)) __aeabi_memclr8(void *dest, size_t n) {
|
||||
__aeabi_memset8(dest, n, 0);
|
||||
}
|
||||
|
||||
void __aeabi_memclr4(void *dest, size_t n) {
|
||||
void __attribute__((weak)) __aeabi_memclr4(void *dest, size_t n) {
|
||||
__aeabi_memset4(dest, n, 0);
|
||||
}
|
||||
|
||||
void __aeabi_memclr(void *dest, size_t n) {
|
||||
void __attribute__((weak)) __aeabi_memclr(void *dest, size_t n) {
|
||||
__aeabi_memset(dest, n, 0);
|
||||
}
|
||||
|
@@ -57,7 +57,7 @@ ENTRY(__bionic_clone)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
|
||||
1: # The child.
|
||||
# Setting lr to 0 will make the unwinder stop at __start_thread
|
||||
|
61
libc/arch-arm/bionic/__restore.S
Normal file
61
libc/arch-arm/bionic/__restore.S
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (C) 2014 The Android Open Source Project
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <private/bionic_asm.h>
|
||||
|
||||
// gdb is smart enough to unwind through signal frames with just the regular
|
||||
// CFI information but libgcc and libunwind both need extra help. We do this
|
||||
// by using .fnstart/.fnend and inserting a nop before both __restore and
|
||||
// __restore_rt (but covered by the .fnstart/.fnend) so that although they're
|
||||
// not inside the functions from objdump's point of view, an unwinder that
|
||||
// blindly looks at the previous instruction (but is then smart enough to check
|
||||
// the DWARF information to find out where it landed) gets the right answer.
|
||||
|
||||
// We need to place .fnstart ourselves (but we may as well keep the free .fnend).
|
||||
#undef __bionic_asm_custom_entry
|
||||
#define __bionic_asm_custom_entry(f)
|
||||
|
||||
.fnstart
|
||||
.save {r0-r15}
|
||||
.pad #32
|
||||
nop
|
||||
ENTRY_PRIVATE(__restore)
|
||||
// This function must have exactly this instruction sequence.
|
||||
mov r7, #__NR_sigreturn
|
||||
swi #0
|
||||
END(__restore)
|
||||
|
||||
.fnstart
|
||||
.save {r0-r15}
|
||||
.pad #160
|
||||
nop
|
||||
ENTRY_PRIVATE(__restore_rt)
|
||||
// This function must have exactly this instruction sequence.
|
||||
mov r7, #__NR_rt_sigreturn
|
||||
swi #0
|
||||
END(__restore_rt)
|
@@ -107,7 +107,7 @@ ENTRY(_longjmp)
|
||||
|
||||
/* validation failed, die die die. */
|
||||
botch:
|
||||
bl PIC_SYM(longjmperror, PLT)
|
||||
bl PIC_SYM(abort, PLT)
|
||||
bl longjmperror
|
||||
bl abort
|
||||
b . - 8 /* Cannot get here */
|
||||
END(_longjmp)
|
||||
|
@@ -40,5 +40,5 @@ ENTRY(abort)
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r3, 0
|
||||
.cfi_rel_offset r14, 4
|
||||
bl PIC_SYM(__libc_android_abort, PLT)
|
||||
bl __libc_android_abort
|
||||
END(abort)
|
||||
|
@@ -56,7 +56,7 @@ ENTRY(setjmp)
|
||||
.cfi_rel_offset r14, 4
|
||||
mov r0, #0x00000000
|
||||
|
||||
bl PIC_SYM(sigblock, PLT)
|
||||
bl sigblock
|
||||
mov r1, r0
|
||||
|
||||
ldmfd sp!, {r0, r14}
|
||||
@@ -108,7 +108,7 @@ ENTRY(longjmp)
|
||||
.cfi_adjust_cfa_offset 4
|
||||
|
||||
mov r0, r2
|
||||
bl PIC_SYM(sigsetmask, PLT)
|
||||
bl sigsetmask
|
||||
|
||||
add sp, sp, #4 /* unalign the stack */
|
||||
.cfi_adjust_cfa_offset -4
|
||||
@@ -147,7 +147,7 @@ ENTRY(longjmp)
|
||||
|
||||
/* validation failed, die die die. */
|
||||
botch:
|
||||
bl PIC_SYM(longjmperror, PLT)
|
||||
bl PIC_SYM(abort, PLT)
|
||||
bl longjmperror
|
||||
bl abort
|
||||
b . - 8 /* Cannot get here */
|
||||
END(longjmp)
|
||||
|
@@ -33,8 +33,6 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _ALIGN_TEXT .align 0
|
||||
|
||||
#include <private/bionic_asm.h>
|
||||
#include <machine/setjmp.h>
|
||||
|
||||
@@ -50,8 +48,8 @@
|
||||
|
||||
ENTRY(sigsetjmp)
|
||||
teq r1, #0
|
||||
beq PIC_SYM(_setjmp, PLT)
|
||||
b PIC_SYM(setjmp, PLT)
|
||||
beq _setjmp
|
||||
b setjmp
|
||||
END(sigsetjmp)
|
||||
|
||||
.L_setjmp_magic:
|
||||
@@ -61,6 +59,6 @@ ENTRY(siglongjmp)
|
||||
ldr r2, .L_setjmp_magic
|
||||
ldr r3, [r0]
|
||||
teq r2, r3
|
||||
beq PIC_SYM(_longjmp, PLT)
|
||||
b PIC_SYM(longjmp, PLT)
|
||||
beq _longjmp
|
||||
b longjmp
|
||||
END(siglongjmp)
|
||||
|
@@ -47,5 +47,5 @@ ENTRY(syscall)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(syscall)
|
||||
|
@@ -40,12 +40,10 @@
|
||||
ENTRY(__strcat_chk)
|
||||
pld [r0, #0]
|
||||
push {r0, lr}
|
||||
.save {r0, lr}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
push {r4, r5}
|
||||
.save {r4, r5}
|
||||
.cfi_adjust_cfa_offset 8
|
||||
.cfi_rel_offset r4, 0
|
||||
.cfi_rel_offset r5, 4
|
||||
@@ -195,9 +193,6 @@ END(__strcat_chk)
|
||||
#include "memcpy_base.S"
|
||||
|
||||
ENTRY_PRIVATE(__strcat_chk_failed)
|
||||
.save {r0, lr}
|
||||
.save {r4, r5}
|
||||
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
|
@@ -39,7 +39,6 @@
|
||||
ENTRY(__strcpy_chk)
|
||||
pld [r0, #0]
|
||||
push {r0, lr}
|
||||
.save {r0, lr}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
@@ -161,7 +160,6 @@ END(__strcpy_chk)
|
||||
#include "memcpy_base.S"
|
||||
|
||||
ENTRY_PRIVATE(__strcpy_chk_failed)
|
||||
.save {r0, lr}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
|
@@ -72,7 +72,6 @@ END(__memcpy_chk)
|
||||
ENTRY(memcpy)
|
||||
pld [r1, #64]
|
||||
push {r0, lr}
|
||||
.save {r0, lr}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
@@ -85,7 +84,6 @@ END(memcpy)
|
||||
ENTRY_PRIVATE(__memcpy_chk_fail)
|
||||
// Preserve lr for backtrace.
|
||||
push {lr}
|
||||
.save {lr}
|
||||
.cfi_def_cfa_offset 4
|
||||
.cfi_rel_offset lr, 0
|
||||
|
||||
|
@@ -54,7 +54,6 @@
|
||||
*/
|
||||
|
||||
ENTRY_PRIVATE(MEMCPY_BASE)
|
||||
.save {r0, lr}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
@@ -172,7 +171,6 @@ ENTRY_PRIVATE(MEMCPY_BASE)
|
||||
END(MEMCPY_BASE)
|
||||
|
||||
ENTRY_PRIVATE(MEMCPY_BASE_ALIGNED)
|
||||
.save {r0, lr}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
@@ -181,17 +179,14 @@ ENTRY_PRIVATE(MEMCPY_BASE_ALIGNED)
|
||||
// i.e., not keeping the stack looking like users expect
|
||||
// (highest numbered register at highest address).
|
||||
strd r4, r5, [sp, #-8]!
|
||||
.save {r4, r5}
|
||||
.cfi_adjust_cfa_offset 8
|
||||
.cfi_rel_offset r4, 0
|
||||
.cfi_rel_offset r5, 4
|
||||
strd r6, r7, [sp, #-8]!
|
||||
.save {r6, r7}
|
||||
.cfi_adjust_cfa_offset 8
|
||||
.cfi_rel_offset r6, 0
|
||||
.cfi_rel_offset r7, 0
|
||||
strd r8, r9, [sp, #-8]!
|
||||
.save {r8, r9}
|
||||
.cfi_adjust_cfa_offset 8
|
||||
.cfi_rel_offset r8, 0
|
||||
.cfi_rel_offset r9, 4
|
||||
|
@@ -44,7 +44,6 @@ ENTRY(__memset_chk)
|
||||
bls .L_done
|
||||
|
||||
// Preserve lr for backtrace.
|
||||
.save {lr}
|
||||
push {lr}
|
||||
.cfi_def_cfa_offset 4
|
||||
.cfi_rel_offset lr, 0
|
||||
@@ -68,7 +67,6 @@ ENTRY(bzero)
|
||||
END(bzero)
|
||||
|
||||
ENTRY(memset)
|
||||
.save {r0}
|
||||
stmfd sp!, {r0}
|
||||
.cfi_def_cfa_offset 4
|
||||
.cfi_rel_offset r0, 0
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008 The Android Open Source Project
|
||||
* Copyright (C) 2014 The Android Open Source Project
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -26,9 +26,5 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <private/bionic_asm.h>
|
||||
|
||||
ENTRY_PRIVATE(__get_sp)
|
||||
move v0, sp
|
||||
j ra
|
||||
END(__get_sp)
|
||||
#define STPCPY
|
||||
#include "string_copy.S"
|
@@ -168,7 +168,6 @@ ENTRY(strcmp)
|
||||
bne .L_do_align
|
||||
|
||||
/* Fast path. */
|
||||
.save {r4-r7}
|
||||
init
|
||||
|
||||
.L_doubleword_aligned:
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2013 The Android Open Source Project
|
||||
* Copyright (C) 2014 The Android Open Source Project
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -25,427 +25,6 @@
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2013 ARM Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the company may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <private/bionic_asm.h>
|
||||
|
||||
.syntax unified
|
||||
|
||||
.thumb
|
||||
.thumb_func
|
||||
|
||||
.macro m_push
|
||||
push {r0, r4, r5, lr}
|
||||
.endm // m_push
|
||||
|
||||
.macro m_pop
|
||||
pop {r0, r4, r5, pc}
|
||||
.endm // m_pop
|
||||
|
||||
.macro m_copy_byte reg, cmd, label
|
||||
ldrb \reg, [r1], #1
|
||||
strb \reg, [r0], #1
|
||||
\cmd \reg, \label
|
||||
.endm // m_copy_byte
|
||||
|
||||
ENTRY(strcpy)
|
||||
// For short copies, hard-code checking the first 8 bytes since this
|
||||
// new code doesn't win until after about 8 bytes.
|
||||
m_push
|
||||
m_copy_byte reg=r2, cmd=cbz, label=strcpy_finish
|
||||
m_copy_byte reg=r3, cmd=cbz, label=strcpy_finish
|
||||
m_copy_byte reg=r4, cmd=cbz, label=strcpy_finish
|
||||
m_copy_byte reg=r5, cmd=cbz, label=strcpy_finish
|
||||
m_copy_byte reg=r2, cmd=cbz, label=strcpy_finish
|
||||
m_copy_byte reg=r3, cmd=cbz, label=strcpy_finish
|
||||
m_copy_byte reg=r4, cmd=cbz, label=strcpy_finish
|
||||
m_copy_byte reg=r5, cmd=cbnz, label=strcpy_continue
|
||||
|
||||
strcpy_finish:
|
||||
m_pop
|
||||
|
||||
strcpy_continue:
|
||||
pld [r1, #0]
|
||||
ands r3, r0, #7
|
||||
beq strcpy_check_src_align
|
||||
|
||||
// Align to a double word (64 bits).
|
||||
rsb r3, r3, #8
|
||||
lsls ip, r3, #31
|
||||
beq strcpy_align_to_32
|
||||
|
||||
ldrb r2, [r1], #1
|
||||
strb r2, [r0], #1
|
||||
cbz r2, strcpy_complete
|
||||
|
||||
strcpy_align_to_32:
|
||||
bcc strcpy_align_to_64
|
||||
|
||||
ldrb r2, [r1], #1
|
||||
strb r2, [r0], #1
|
||||
cbz r2, strcpy_complete
|
||||
ldrb r2, [r1], #1
|
||||
strb r2, [r0], #1
|
||||
cbz r2, strcpy_complete
|
||||
|
||||
strcpy_align_to_64:
|
||||
tst r3, #4
|
||||
beq strcpy_check_src_align
|
||||
ldr r2, [r1], #4
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_first_register
|
||||
str r2, [r0], #4
|
||||
|
||||
strcpy_check_src_align:
|
||||
// At this point dst is aligned to a double word, check if src
|
||||
// is also aligned to a double word.
|
||||
ands r3, r1, #7
|
||||
bne strcpy_unaligned_copy
|
||||
|
||||
.p2align 2
|
||||
strcpy_mainloop:
|
||||
ldrd r2, r3, [r1], #8
|
||||
|
||||
pld [r1, #64]
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_first_register
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_second_register
|
||||
|
||||
strd r2, r3, [r0], #8
|
||||
b strcpy_mainloop
|
||||
|
||||
strcpy_complete:
|
||||
m_pop
|
||||
|
||||
strcpy_zero_in_first_register:
|
||||
lsls lr, ip, #17
|
||||
bne strcpy_copy1byte
|
||||
bcs strcpy_copy2bytes
|
||||
lsls ip, ip, #1
|
||||
bne strcpy_copy3bytes
|
||||
|
||||
strcpy_copy4bytes:
|
||||
// Copy 4 bytes to the destiniation.
|
||||
str r2, [r0]
|
||||
m_pop
|
||||
|
||||
strcpy_copy1byte:
|
||||
strb r2, [r0]
|
||||
m_pop
|
||||
|
||||
strcpy_copy2bytes:
|
||||
strh r2, [r0]
|
||||
m_pop
|
||||
|
||||
strcpy_copy3bytes:
|
||||
strh r2, [r0], #2
|
||||
lsr r2, #16
|
||||
strb r2, [r0]
|
||||
m_pop
|
||||
|
||||
strcpy_zero_in_second_register:
|
||||
lsls lr, ip, #17
|
||||
bne strcpy_copy5bytes
|
||||
bcs strcpy_copy6bytes
|
||||
lsls ip, ip, #1
|
||||
bne strcpy_copy7bytes
|
||||
|
||||
// Copy 8 bytes to the destination.
|
||||
strd r2, r3, [r0]
|
||||
m_pop
|
||||
|
||||
strcpy_copy5bytes:
|
||||
str r2, [r0], #4
|
||||
strb r3, [r0]
|
||||
m_pop
|
||||
|
||||
strcpy_copy6bytes:
|
||||
str r2, [r0], #4
|
||||
strh r3, [r0]
|
||||
m_pop
|
||||
|
||||
strcpy_copy7bytes:
|
||||
str r2, [r0], #4
|
||||
strh r3, [r0], #2
|
||||
lsr r3, #16
|
||||
strb r3, [r0]
|
||||
m_pop
|
||||
|
||||
strcpy_unaligned_copy:
|
||||
// Dst is aligned to a double word, while src is at an unknown alignment.
|
||||
// There are 7 different versions of the unaligned copy code
|
||||
// to prevent overreading the src. The mainloop of every single version
|
||||
// will store 64 bits per loop. The difference is how much of src can
|
||||
// be read without potentially crossing a page boundary.
|
||||
tbb [pc, r3]
|
||||
strcpy_unaligned_branchtable:
|
||||
.byte 0
|
||||
.byte ((strcpy_unalign7 - strcpy_unaligned_branchtable)/2)
|
||||
.byte ((strcpy_unalign6 - strcpy_unaligned_branchtable)/2)
|
||||
.byte ((strcpy_unalign5 - strcpy_unaligned_branchtable)/2)
|
||||
.byte ((strcpy_unalign4 - strcpy_unaligned_branchtable)/2)
|
||||
.byte ((strcpy_unalign3 - strcpy_unaligned_branchtable)/2)
|
||||
.byte ((strcpy_unalign2 - strcpy_unaligned_branchtable)/2)
|
||||
.byte ((strcpy_unalign1 - strcpy_unaligned_branchtable)/2)
|
||||
|
||||
.p2align 2
|
||||
// Can read 7 bytes before possibly crossing a page.
|
||||
strcpy_unalign7:
|
||||
ldr r2, [r1], #4
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_first_register
|
||||
|
||||
ldrb r3, [r1]
|
||||
cbz r3, strcpy_unalign7_copy5bytes
|
||||
ldrb r4, [r1, #1]
|
||||
cbz r4, strcpy_unalign7_copy6bytes
|
||||
ldrb r5, [r1, #2]
|
||||
cbz r5, strcpy_unalign7_copy7bytes
|
||||
|
||||
ldr r3, [r1], #4
|
||||
pld [r1, #64]
|
||||
|
||||
lsrs ip, r3, #24
|
||||
strd r2, r3, [r0], #8
|
||||
beq strcpy_unalign_return
|
||||
b strcpy_unalign7
|
||||
|
||||
strcpy_unalign7_copy5bytes:
|
||||
str r2, [r0], #4
|
||||
strb r3, [r0]
|
||||
strcpy_unalign_return:
|
||||
m_pop
|
||||
|
||||
strcpy_unalign7_copy6bytes:
|
||||
str r2, [r0], #4
|
||||
strb r3, [r0], #1
|
||||
strb r4, [r0], #1
|
||||
m_pop
|
||||
|
||||
strcpy_unalign7_copy7bytes:
|
||||
str r2, [r0], #4
|
||||
strb r3, [r0], #1
|
||||
strb r4, [r0], #1
|
||||
strb r5, [r0], #1
|
||||
m_pop
|
||||
|
||||
.p2align 2
|
||||
// Can read 6 bytes before possibly crossing a page.
|
||||
strcpy_unalign6:
|
||||
ldr r2, [r1], #4
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_first_register
|
||||
|
||||
ldrb r4, [r1]
|
||||
cbz r4, strcpy_unalign_copy5bytes
|
||||
ldrb r5, [r1, #1]
|
||||
cbz r5, strcpy_unalign_copy6bytes
|
||||
|
||||
ldr r3, [r1], #4
|
||||
pld [r1, #64]
|
||||
|
||||
tst r3, #0xff0000
|
||||
beq strcpy_copy7bytes
|
||||
lsrs ip, r3, #24
|
||||
strd r2, r3, [r0], #8
|
||||
beq strcpy_unalign_return
|
||||
b strcpy_unalign6
|
||||
|
||||
.p2align 2
|
||||
// Can read 5 bytes before possibly crossing a page.
|
||||
strcpy_unalign5:
|
||||
ldr r2, [r1], #4
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_first_register
|
||||
|
||||
ldrb r4, [r1]
|
||||
cbz r4, strcpy_unalign_copy5bytes
|
||||
|
||||
ldr r3, [r1], #4
|
||||
|
||||
pld [r1, #64]
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_second_register
|
||||
|
||||
strd r2, r3, [r0], #8
|
||||
b strcpy_unalign5
|
||||
|
||||
strcpy_unalign_copy5bytes:
|
||||
str r2, [r0], #4
|
||||
strb r4, [r0]
|
||||
m_pop
|
||||
|
||||
strcpy_unalign_copy6bytes:
|
||||
str r2, [r0], #4
|
||||
strb r4, [r0], #1
|
||||
strb r5, [r0]
|
||||
m_pop
|
||||
|
||||
.p2align 2
|
||||
// Can read 4 bytes before possibly crossing a page.
|
||||
strcpy_unalign4:
|
||||
ldr r2, [r1], #4
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_first_register
|
||||
|
||||
ldr r3, [r1], #4
|
||||
pld [r1, #64]
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_second_register
|
||||
|
||||
strd r2, r3, [r0], #8
|
||||
b strcpy_unalign4
|
||||
|
||||
.p2align 2
|
||||
// Can read 3 bytes before possibly crossing a page.
|
||||
strcpy_unalign3:
|
||||
ldrb r2, [r1]
|
||||
cbz r2, strcpy_unalign3_copy1byte
|
||||
ldrb r3, [r1, #1]
|
||||
cbz r3, strcpy_unalign3_copy2bytes
|
||||
ldrb r4, [r1, #2]
|
||||
cbz r4, strcpy_unalign3_copy3bytes
|
||||
|
||||
ldr r2, [r1], #4
|
||||
ldr r3, [r1], #4
|
||||
|
||||
pld [r1, #64]
|
||||
|
||||
lsrs lr, r2, #24
|
||||
beq strcpy_copy4bytes
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_second_register
|
||||
|
||||
strd r2, r3, [r0], #8
|
||||
b strcpy_unalign3
|
||||
|
||||
strcpy_unalign3_copy1byte:
|
||||
strb r2, [r0]
|
||||
m_pop
|
||||
|
||||
strcpy_unalign3_copy2bytes:
|
||||
strb r2, [r0], #1
|
||||
strb r3, [r0]
|
||||
m_pop
|
||||
|
||||
strcpy_unalign3_copy3bytes:
|
||||
strb r2, [r0], #1
|
||||
strb r3, [r0], #1
|
||||
strb r4, [r0]
|
||||
m_pop
|
||||
|
||||
.p2align 2
|
||||
// Can read 2 bytes before possibly crossing a page.
|
||||
strcpy_unalign2:
|
||||
ldrb r2, [r1]
|
||||
cbz r2, strcpy_unalign_copy1byte
|
||||
ldrb r4, [r1, #1]
|
||||
cbz r4, strcpy_unalign_copy2bytes
|
||||
|
||||
ldr r2, [r1], #4
|
||||
ldr r3, [r1], #4
|
||||
pld [r1, #64]
|
||||
|
||||
tst r2, #0xff0000
|
||||
beq strcpy_copy3bytes
|
||||
lsrs ip, r2, #24
|
||||
beq strcpy_copy4bytes
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_second_register
|
||||
|
||||
strd r2, r3, [r0], #8
|
||||
b strcpy_unalign2
|
||||
|
||||
.p2align 2
|
||||
// Can read 1 byte before possibly crossing a page.
|
||||
strcpy_unalign1:
|
||||
ldrb r2, [r1]
|
||||
cbz r2, strcpy_unalign_copy1byte
|
||||
|
||||
ldr r2, [r1], #4
|
||||
ldr r3, [r1], #4
|
||||
|
||||
pld [r1, #64]
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_first_register
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_second_register
|
||||
|
||||
strd r2, r3, [r0], #8
|
||||
b strcpy_unalign1
|
||||
|
||||
strcpy_unalign_copy1byte:
|
||||
strb r2, [r0]
|
||||
m_pop
|
||||
|
||||
strcpy_unalign_copy2bytes:
|
||||
strb r2, [r0], #1
|
||||
strb r4, [r0]
|
||||
m_pop
|
||||
END(strcpy)
|
||||
#define STRCPY
|
||||
#include "string_copy.S"
|
||||
|
513
libc/arch-arm/cortex-a15/bionic/string_copy.S
Normal file
513
libc/arch-arm/cortex-a15/bionic/string_copy.S
Normal file
@@ -0,0 +1,513 @@
|
||||
/*
|
||||
* Copyright (C) 2013 The Android Open Source Project
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2013 ARM Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the company may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if !defined(STPCPY) && !defined(STRCPY)
|
||||
#error "Either STPCPY or STRCPY must be defined."
|
||||
#endif
|
||||
|
||||
#include <private/bionic_asm.h>
|
||||
|
||||
.syntax unified
|
||||
|
||||
.thumb
|
||||
.thumb_func
|
||||
|
||||
#if defined(STPCPY)
|
||||
.macro m_push
|
||||
push {r4, r5, lr}
|
||||
.cfi_def_cfa_offset 12
|
||||
.cfi_rel_offset r4, 0
|
||||
.cfi_rel_offset r5, 4
|
||||
.cfi_rel_offset lr, 8
|
||||
.endm // m_push
|
||||
#else
|
||||
.macro m_push
|
||||
push {r0, r4, r5, lr}
|
||||
.cfi_def_cfa_offset 16
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset r4, 4
|
||||
.cfi_rel_offset r5, 8
|
||||
.cfi_rel_offset lr, 12
|
||||
.endm // m_push
|
||||
#endif
|
||||
|
||||
#if defined(STPCPY)
|
||||
.macro m_pop
|
||||
pop {r4, r5, pc}
|
||||
.endm // m_pop
|
||||
#else
|
||||
.macro m_pop
|
||||
pop {r0, r4, r5, pc}
|
||||
.endm // m_pop
|
||||
#endif
|
||||
|
||||
.macro m_copy_byte reg, cmd, label
|
||||
ldrb \reg, [r1], #1
|
||||
strb \reg, [r0], #1
|
||||
\cmd \reg, \label
|
||||
.endm // m_copy_byte
|
||||
|
||||
#if defined(STPCPY)
|
||||
ENTRY(stpcpy)
|
||||
#else
|
||||
ENTRY(strcpy)
|
||||
#endif
|
||||
// For short copies, hard-code checking the first 8 bytes since this
|
||||
// new code doesn't win until after about 8 bytes.
|
||||
m_push
|
||||
m_copy_byte reg=r2, cmd=cbz, label=.Lstringcopy_finish
|
||||
m_copy_byte reg=r3, cmd=cbz, label=.Lstringcopy_finish
|
||||
m_copy_byte reg=r4, cmd=cbz, label=.Lstringcopy_finish
|
||||
m_copy_byte reg=r5, cmd=cbz, label=.Lstringcopy_finish
|
||||
m_copy_byte reg=r2, cmd=cbz, label=.Lstringcopy_finish
|
||||
m_copy_byte reg=r3, cmd=cbz, label=.Lstringcopy_finish
|
||||
m_copy_byte reg=r4, cmd=cbz, label=.Lstringcopy_finish
|
||||
m_copy_byte reg=r5, cmd=cbnz, label=.Lstringcopy_continue
|
||||
|
||||
.Lstringcopy_finish:
|
||||
#if defined(STPCPY)
|
||||
sub r0, r0, #1
|
||||
#endif
|
||||
m_pop
|
||||
|
||||
.Lstringcopy_continue:
|
||||
pld [r1, #0]
|
||||
ands r3, r0, #7
|
||||
beq .Lstringcopy_check_src_align
|
||||
|
||||
// Align to a double word (64 bits).
|
||||
rsb r3, r3, #8
|
||||
lsls ip, r3, #31
|
||||
beq .Lstringcopy_align_to_32
|
||||
|
||||
ldrb r2, [r1], #1
|
||||
strb r2, [r0], #1
|
||||
cbz r2, .Lstringcopy_complete
|
||||
|
||||
.Lstringcopy_align_to_32:
|
||||
bcc .Lstringcopy_align_to_64
|
||||
|
||||
ldrb r2, [r1], #1
|
||||
strb r2, [r0], #1
|
||||
cbz r2, .Lstringcopy_complete
|
||||
ldrb r2, [r1], #1
|
||||
strb r2, [r0], #1
|
||||
cbz r2, .Lstringcopy_complete
|
||||
|
||||
.Lstringcopy_align_to_64:
|
||||
tst r3, #4
|
||||
beq .Lstringcopy_check_src_align
|
||||
ldr r2, [r1], #4
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_first_register
|
||||
str r2, [r0], #4
|
||||
|
||||
.Lstringcopy_check_src_align:
|
||||
// At this point dst is aligned to a double word, check if src
|
||||
// is also aligned to a double word.
|
||||
ands r3, r1, #7
|
||||
bne .Lstringcopy_unaligned_copy
|
||||
|
||||
.p2align 2
|
||||
.Lstringcopy_mainloop:
|
||||
ldrd r2, r3, [r1], #8
|
||||
|
||||
pld [r1, #64]
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_first_register
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_second_register
|
||||
|
||||
strd r2, r3, [r0], #8
|
||||
b .Lstringcopy_mainloop
|
||||
|
||||
.Lstringcopy_complete:
|
||||
#if defined(STPCPY)
|
||||
sub r0, r0, #1
|
||||
#endif
|
||||
m_pop
|
||||
|
||||
.Lstringcopy_zero_in_first_register:
|
||||
lsls lr, ip, #17
|
||||
bne .Lstringcopy_copy1byte
|
||||
bcs .Lstringcopy_copy2bytes
|
||||
lsls ip, ip, #1
|
||||
bne .Lstringcopy_copy3bytes
|
||||
|
||||
.Lstringcopy_copy4bytes:
|
||||
// Copy 4 bytes to the destiniation.
|
||||
#if defined(STPCPY)
|
||||
str r2, [r0], #3
|
||||
#else
|
||||
str r2, [r0]
|
||||
#endif
|
||||
m_pop
|
||||
|
||||
.Lstringcopy_copy1byte:
|
||||
strb r2, [r0]
|
||||
m_pop
|
||||
|
||||
.Lstringcopy_copy2bytes:
|
||||
#if defined(STPCPY)
|
||||
strh r2, [r0], #1
|
||||
#else
|
||||
strh r2, [r0]
|
||||
#endif
|
||||
m_pop
|
||||
|
||||
.Lstringcopy_copy3bytes:
|
||||
strh r2, [r0], #2
|
||||
lsr r2, #16
|
||||
strb r2, [r0]
|
||||
m_pop
|
||||
|
||||
.Lstringcopy_zero_in_second_register:
|
||||
lsls lr, ip, #17
|
||||
bne .Lstringcopy_copy5bytes
|
||||
bcs .Lstringcopy_copy6bytes
|
||||
lsls ip, ip, #1
|
||||
bne .Lstringcopy_copy7bytes
|
||||
|
||||
// Copy 8 bytes to the destination.
|
||||
strd r2, r3, [r0]
|
||||
#if defined(STPCPY)
|
||||
add r0, r0, #7
|
||||
#endif
|
||||
m_pop
|
||||
|
||||
.Lstringcopy_copy5bytes:
|
||||
str r2, [r0], #4
|
||||
strb r3, [r0]
|
||||
m_pop
|
||||
|
||||
.Lstringcopy_copy6bytes:
|
||||
str r2, [r0], #4
|
||||
#if defined(STPCPY)
|
||||
strh r3, [r0], #1
|
||||
#else
|
||||
strh r3, [r0]
|
||||
#endif
|
||||
m_pop
|
||||
|
||||
.Lstringcopy_copy7bytes:
|
||||
str r2, [r0], #4
|
||||
strh r3, [r0], #2
|
||||
lsr r3, #16
|
||||
strb r3, [r0]
|
||||
m_pop
|
||||
|
||||
.Lstringcopy_unaligned_copy:
|
||||
// Dst is aligned to a double word, while src is at an unknown alignment.
|
||||
// There are 7 different versions of the unaligned copy code
|
||||
// to prevent overreading the src. The mainloop of every single version
|
||||
// will store 64 bits per loop. The difference is how much of src can
|
||||
// be read without potentially crossing a page boundary.
|
||||
tbb [pc, r3]
|
||||
.Lstringcopy_unaligned_branchtable:
|
||||
.byte 0
|
||||
.byte ((.Lstringcopy_unalign7 - .Lstringcopy_unaligned_branchtable)/2)
|
||||
.byte ((.Lstringcopy_unalign6 - .Lstringcopy_unaligned_branchtable)/2)
|
||||
.byte ((.Lstringcopy_unalign5 - .Lstringcopy_unaligned_branchtable)/2)
|
||||
.byte ((.Lstringcopy_unalign4 - .Lstringcopy_unaligned_branchtable)/2)
|
||||
.byte ((.Lstringcopy_unalign3 - .Lstringcopy_unaligned_branchtable)/2)
|
||||
.byte ((.Lstringcopy_unalign2 - .Lstringcopy_unaligned_branchtable)/2)
|
||||
.byte ((.Lstringcopy_unalign1 - .Lstringcopy_unaligned_branchtable)/2)
|
||||
|
||||
.p2align 2
|
||||
// Can read 7 bytes before possibly crossing a page.
|
||||
.Lstringcopy_unalign7:
|
||||
ldr r2, [r1], #4
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_first_register
|
||||
|
||||
ldrb r3, [r1]
|
||||
cbz r3, .Lstringcopy_unalign7_copy5bytes
|
||||
ldrb r4, [r1, #1]
|
||||
cbz r4, .Lstringcopy_unalign7_copy6bytes
|
||||
ldrb r5, [r1, #2]
|
||||
cbz r5, .Lstringcopy_unalign7_copy7bytes
|
||||
|
||||
ldr r3, [r1], #4
|
||||
pld [r1, #64]
|
||||
|
||||
lsrs ip, r3, #24
|
||||
strd r2, r3, [r0], #8
|
||||
#if defined(STPCPY)
|
||||
beq .Lstringcopy_finish
|
||||
#else
|
||||
beq .Lstringcopy_unalign_return
|
||||
#endif
|
||||
b .Lstringcopy_unalign7
|
||||
|
||||
.Lstringcopy_unalign7_copy5bytes:
|
||||
str r2, [r0], #4
|
||||
strb r3, [r0]
|
||||
.Lstringcopy_unalign_return:
|
||||
m_pop
|
||||
|
||||
.Lstringcopy_unalign7_copy6bytes:
|
||||
str r2, [r0], #4
|
||||
strb r3, [r0], #1
|
||||
strb r4, [r0]
|
||||
m_pop
|
||||
|
||||
.Lstringcopy_unalign7_copy7bytes:
|
||||
str r2, [r0], #4
|
||||
strb r3, [r0], #1
|
||||
strb r4, [r0], #1
|
||||
strb r5, [r0]
|
||||
m_pop
|
||||
|
||||
.p2align 2
|
||||
// Can read 6 bytes before possibly crossing a page.
|
||||
.Lstringcopy_unalign6:
|
||||
ldr r2, [r1], #4
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_first_register
|
||||
|
||||
ldrb r4, [r1]
|
||||
cbz r4, .Lstringcopy_unalign_copy5bytes
|
||||
ldrb r5, [r1, #1]
|
||||
cbz r5, .Lstringcopy_unalign_copy6bytes
|
||||
|
||||
ldr r3, [r1], #4
|
||||
pld [r1, #64]
|
||||
|
||||
tst r3, #0xff0000
|
||||
beq .Lstringcopy_copy7bytes
|
||||
lsrs ip, r3, #24
|
||||
strd r2, r3, [r0], #8
|
||||
#if defined(STPCPY)
|
||||
beq .Lstringcopy_finish
|
||||
#else
|
||||
beq .Lstringcopy_unalign_return
|
||||
#endif
|
||||
b .Lstringcopy_unalign6
|
||||
|
||||
.p2align 2
|
||||
// Can read 5 bytes before possibly crossing a page.
|
||||
.Lstringcopy_unalign5:
|
||||
ldr r2, [r1], #4
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_first_register
|
||||
|
||||
ldrb r4, [r1]
|
||||
cbz r4, .Lstringcopy_unalign_copy5bytes
|
||||
|
||||
ldr r3, [r1], #4
|
||||
|
||||
pld [r1, #64]
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_second_register
|
||||
|
||||
strd r2, r3, [r0], #8
|
||||
b .Lstringcopy_unalign5
|
||||
|
||||
.Lstringcopy_unalign_copy5bytes:
|
||||
str r2, [r0], #4
|
||||
strb r4, [r0]
|
||||
m_pop
|
||||
|
||||
.Lstringcopy_unalign_copy6bytes:
|
||||
str r2, [r0], #4
|
||||
strb r4, [r0], #1
|
||||
strb r5, [r0]
|
||||
m_pop
|
||||
|
||||
.p2align 2
|
||||
// Can read 4 bytes before possibly crossing a page.
|
||||
.Lstringcopy_unalign4:
|
||||
ldr r2, [r1], #4
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_first_register
|
||||
|
||||
ldr r3, [r1], #4
|
||||
pld [r1, #64]
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_second_register
|
||||
|
||||
strd r2, r3, [r0], #8
|
||||
b .Lstringcopy_unalign4
|
||||
|
||||
.p2align 2
|
||||
// Can read 3 bytes before possibly crossing a page.
|
||||
.Lstringcopy_unalign3:
|
||||
ldrb r2, [r1]
|
||||
cbz r2, .Lstringcopy_unalign3_copy1byte
|
||||
ldrb r3, [r1, #1]
|
||||
cbz r3, .Lstringcopy_unalign3_copy2bytes
|
||||
ldrb r4, [r1, #2]
|
||||
cbz r4, .Lstringcopy_unalign3_copy3bytes
|
||||
|
||||
ldr r2, [r1], #4
|
||||
ldr r3, [r1], #4
|
||||
|
||||
pld [r1, #64]
|
||||
|
||||
lsrs lr, r2, #24
|
||||
beq .Lstringcopy_copy4bytes
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_second_register
|
||||
|
||||
strd r2, r3, [r0], #8
|
||||
b .Lstringcopy_unalign3
|
||||
|
||||
.Lstringcopy_unalign3_copy1byte:
|
||||
strb r2, [r0]
|
||||
m_pop
|
||||
|
||||
.Lstringcopy_unalign3_copy2bytes:
|
||||
strb r2, [r0], #1
|
||||
strb r3, [r0]
|
||||
m_pop
|
||||
|
||||
.Lstringcopy_unalign3_copy3bytes:
|
||||
strb r2, [r0], #1
|
||||
strb r3, [r0], #1
|
||||
strb r4, [r0]
|
||||
m_pop
|
||||
|
||||
.p2align 2
|
||||
// Can read 2 bytes before possibly crossing a page.
|
||||
.Lstringcopy_unalign2:
|
||||
ldrb r2, [r1]
|
||||
cbz r2, .Lstringcopy_unalign_copy1byte
|
||||
ldrb r4, [r1, #1]
|
||||
cbz r4, .Lstringcopy_unalign_copy2bytes
|
||||
|
||||
ldr r2, [r1], #4
|
||||
ldr r3, [r1], #4
|
||||
pld [r1, #64]
|
||||
|
||||
tst r2, #0xff0000
|
||||
beq .Lstringcopy_copy3bytes
|
||||
lsrs ip, r2, #24
|
||||
beq .Lstringcopy_copy4bytes
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_second_register
|
||||
|
||||
strd r2, r3, [r0], #8
|
||||
b .Lstringcopy_unalign2
|
||||
|
||||
.p2align 2
|
||||
// Can read 1 byte before possibly crossing a page.
|
||||
.Lstringcopy_unalign1:
|
||||
ldrb r2, [r1]
|
||||
cbz r2, .Lstringcopy_unalign_copy1byte
|
||||
|
||||
ldr r2, [r1], #4
|
||||
ldr r3, [r1], #4
|
||||
|
||||
pld [r1, #64]
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_first_register
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_second_register
|
||||
|
||||
strd r2, r3, [r0], #8
|
||||
b .Lstringcopy_unalign1
|
||||
|
||||
.Lstringcopy_unalign_copy1byte:
|
||||
strb r2, [r0]
|
||||
m_pop
|
||||
|
||||
.Lstringcopy_unalign_copy2bytes:
|
||||
strb r2, [r0], #1
|
||||
strb r4, [r0]
|
||||
m_pop
|
||||
#if defined(STPCPY)
|
||||
END(stpcpy)
|
||||
#else
|
||||
END(strcpy)
|
||||
#endif
|
@@ -1,10 +1,11 @@
|
||||
libc_bionic_src_files_arm += \
|
||||
arch-arm/cortex-a15/bionic/memcpy.S \
|
||||
arch-arm/cortex-a15/bionic/memset.S \
|
||||
arch-arm/cortex-a15/bionic/stpcpy.S \
|
||||
arch-arm/cortex-a15/bionic/strcat.S \
|
||||
arch-arm/cortex-a15/bionic/__strcat_chk.S \
|
||||
arch-arm/cortex-a15/bionic/strcmp.S \
|
||||
arch-arm/cortex-a15/bionic/strcpy.S \
|
||||
arch-arm/cortex-a15/bionic/strlen.S \
|
||||
arch-arm/cortex-a15/bionic/__strcat_chk.S \
|
||||
arch-arm/cortex-a15/bionic/__strcpy_chk.S \
|
||||
arch-arm/cortex-a15/bionic/strlen.S \
|
||||
bionic/memmove.c \
|
||||
|
@@ -40,12 +40,10 @@
|
||||
ENTRY(__strcat_chk)
|
||||
pld [r0, #0]
|
||||
push {r0, lr}
|
||||
.save {r0, lr}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
push {r4, r5}
|
||||
.save {r4, r5}
|
||||
.cfi_adjust_cfa_offset 8
|
||||
.cfi_rel_offset r4, 0
|
||||
.cfi_rel_offset r5, 4
|
||||
@@ -199,8 +197,6 @@ END(__strcat_chk)
|
||||
#include "memcpy_base.S"
|
||||
|
||||
ENTRY_PRIVATE(__strcat_chk_fail)
|
||||
.save {r0, lr}
|
||||
.save {r4, r5}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
|
@@ -39,7 +39,6 @@
|
||||
ENTRY(__strcpy_chk)
|
||||
pld [r0, #0]
|
||||
push {r0, lr}
|
||||
.save {r0, lr}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
@@ -165,7 +164,6 @@ END(__strcpy_chk)
|
||||
#include "memcpy_base.S"
|
||||
|
||||
ENTRY_PRIVATE(__strcpy_chk_fail)
|
||||
.save {r0, lr}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
|
@@ -50,7 +50,6 @@ END(__memcpy_chk)
|
||||
ENTRY(memcpy)
|
||||
pld [r1, #0]
|
||||
stmfd sp!, {r0, lr}
|
||||
.save {r0, lr}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
@@ -64,7 +63,6 @@ END(memcpy)
|
||||
ENTRY_PRIVATE(__memcpy_chk_fail)
|
||||
// Preserve lr for backtrace.
|
||||
push {lr}
|
||||
.save {lr}
|
||||
.cfi_def_cfa_offset 4
|
||||
.cfi_rel_offset lr, 0
|
||||
|
||||
|
@@ -33,7 +33,6 @@
|
||||
*/
|
||||
|
||||
ENTRY_PRIVATE(MEMCPY_BASE)
|
||||
.save {r0, lr}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
@@ -139,14 +138,12 @@ ENTRY_PRIVATE(MEMCPY_BASE)
|
||||
END(MEMCPY_BASE)
|
||||
|
||||
ENTRY_PRIVATE(MEMCPY_BASE_ALIGNED)
|
||||
.save {r0, lr}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
|
||||
/* Simple arm-only copy loop to handle aligned copy operations */
|
||||
stmfd sp!, {r4-r8}
|
||||
.save {r4-r8}
|
||||
.cfi_adjust_cfa_offset 20
|
||||
.cfi_rel_offset r4, 0
|
||||
.cfi_rel_offset r5, 4
|
||||
|
@@ -42,7 +42,6 @@ ENTRY(__memset_chk)
|
||||
|
||||
// Preserve lr for backtrace.
|
||||
push {lr}
|
||||
.save {lr}
|
||||
.cfi_def_cfa_offset 4
|
||||
.cfi_rel_offset lr, 0
|
||||
|
||||
@@ -72,7 +71,6 @@ ENTRY(memset)
|
||||
bhi __memset_large_copy
|
||||
|
||||
stmfd sp!, {r0}
|
||||
.save {r0}
|
||||
.cfi_def_cfa_offset 4
|
||||
.cfi_rel_offset r0, 0
|
||||
|
||||
@@ -114,7 +112,6 @@ ENTRY_PRIVATE(__memset_large_copy)
|
||||
* offset = (4-(src&3))&3 = -src & 3
|
||||
*/
|
||||
stmfd sp!, {r0, r4-r7, lr}
|
||||
.save {r0, r4-r7, lr}
|
||||
.cfi_def_cfa_offset 24
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset r4, 4
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008 The Android Open Source Project
|
||||
* Copyright (C) 2014 The Android Open Source Project
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -26,9 +26,5 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <private/bionic_asm.h>
|
||||
|
||||
ENTRY_PRIVATE(__get_sp)
|
||||
mov r0, sp
|
||||
bx lr
|
||||
END(__get_sp)
|
||||
#define STPCPY
|
||||
#include "string_copy.S"
|
@@ -168,7 +168,6 @@ ENTRY(strcmp)
|
||||
bne .L_do_align
|
||||
|
||||
/* Fast path. */
|
||||
.save {r4-r7}
|
||||
init
|
||||
|
||||
.L_doubleword_aligned:
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2013 The Android Open Source Project
|
||||
* Copyright (C) 2014 The Android Open Source Project
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -25,432 +25,6 @@
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2013 ARM Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the company may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <private/bionic_asm.h>
|
||||
|
||||
.syntax unified
|
||||
|
||||
.thumb
|
||||
.thumb_func
|
||||
|
||||
.macro m_push
|
||||
push {r0, r4, r5, lr}
|
||||
.endm // m_push
|
||||
|
||||
.macro m_ret inst
|
||||
\inst {r0, r4, r5, pc}
|
||||
.endm // m_ret
|
||||
|
||||
.macro m_copy_byte reg, cmd, label
|
||||
ldrb \reg, [r1], #1
|
||||
strb \reg, [r0], #1
|
||||
\cmd \reg, \label
|
||||
.endm // m_copy_byte
|
||||
|
||||
ENTRY(strcpy)
|
||||
// Unroll the first 8 bytes that will be copied.
|
||||
m_push
|
||||
m_copy_byte reg=r2, cmd=cbz, label=strcpy_finish
|
||||
m_copy_byte reg=r3, cmd=cbz, label=strcpy_finish
|
||||
m_copy_byte reg=r4, cmd=cbz, label=strcpy_finish
|
||||
m_copy_byte reg=r5, cmd=cbz, label=strcpy_finish
|
||||
m_copy_byte reg=r2, cmd=cbz, label=strcpy_finish
|
||||
m_copy_byte reg=r3, cmd=cbz, label=strcpy_finish
|
||||
m_copy_byte reg=r4, cmd=cbz, label=strcpy_finish
|
||||
m_copy_byte reg=r5, cmd=cbnz, label=strcpy_continue
|
||||
|
||||
strcpy_finish:
|
||||
m_ret inst=pop
|
||||
|
||||
strcpy_continue:
|
||||
pld [r1, #0]
|
||||
ands r3, r0, #7
|
||||
bne strcpy_align_dst
|
||||
|
||||
strcpy_check_src_align:
|
||||
// At this point dst is aligned to a double word, check if src
|
||||
// is also aligned to a double word.
|
||||
ands r3, r1, #7
|
||||
bne strcpy_unaligned_copy
|
||||
|
||||
.p2align 2
|
||||
strcpy_mainloop:
|
||||
ldmia r1!, {r2, r3}
|
||||
|
||||
pld [r1, #64]
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_first_register
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_second_register
|
||||
|
||||
stmia r0!, {r2, r3}
|
||||
b strcpy_mainloop
|
||||
|
||||
strcpy_zero_in_first_register:
|
||||
lsls lr, ip, #17
|
||||
itt ne
|
||||
strbne r2, [r0]
|
||||
m_ret inst=popne
|
||||
itt cs
|
||||
strhcs r2, [r0]
|
||||
m_ret inst=popcs
|
||||
lsls ip, ip, #1
|
||||
itt eq
|
||||
streq r2, [r0]
|
||||
m_ret inst=popeq
|
||||
strh r2, [r0], #2
|
||||
lsr r3, r2, #16
|
||||
strb r3, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
strcpy_zero_in_second_register:
|
||||
lsls lr, ip, #17
|
||||
ittt ne
|
||||
stmiane r0!, {r2}
|
||||
strbne r3, [r0]
|
||||
m_ret inst=popne
|
||||
ittt cs
|
||||
strcs r2, [r0], #4
|
||||
strhcs r3, [r0]
|
||||
m_ret inst=popcs
|
||||
lsls ip, ip, #1
|
||||
itt eq
|
||||
stmiaeq r0, {r2, r3}
|
||||
m_ret inst=popeq
|
||||
stmia r0!, {r2}
|
||||
strh r3, [r0], #2
|
||||
lsr r4, r3, #16
|
||||
strb r4, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
strcpy_align_dst:
|
||||
// Align to a double word (64 bits).
|
||||
rsb r3, r3, #8
|
||||
lsls ip, r3, #31
|
||||
beq strcpy_align_to_32
|
||||
|
||||
ldrb r2, [r1], #1
|
||||
strb r2, [r0], #1
|
||||
cbz r2, strcpy_complete
|
||||
|
||||
strcpy_align_to_32:
|
||||
bcc strcpy_align_to_64
|
||||
|
||||
ldrb r4, [r1], #1
|
||||
strb r4, [r0], #1
|
||||
cmp r4, #0
|
||||
it eq
|
||||
m_ret inst=popeq
|
||||
ldrb r5, [r1], #1
|
||||
strb r5, [r0], #1
|
||||
cmp r5, #0
|
||||
it eq
|
||||
m_ret inst=popeq
|
||||
|
||||
strcpy_align_to_64:
|
||||
tst r3, #4
|
||||
beq strcpy_check_src_align
|
||||
ldr r2, [r1], #4
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_first_register
|
||||
stmia r0!, {r2}
|
||||
b strcpy_check_src_align
|
||||
|
||||
strcpy_complete:
|
||||
m_ret inst=pop
|
||||
|
||||
strcpy_unaligned_copy:
|
||||
// Dst is aligned to a double word, while src is at an unknown alignment.
|
||||
// There are 7 different versions of the unaligned copy code
|
||||
// to prevent overreading the src. The mainloop of every single version
|
||||
// will store 64 bits per loop. The difference is how much of src can
|
||||
// be read without potentially crossing a page boundary.
|
||||
tbb [pc, r3]
|
||||
strcpy_unaligned_branchtable:
|
||||
.byte 0
|
||||
.byte ((strcpy_unalign7 - strcpy_unaligned_branchtable)/2)
|
||||
.byte ((strcpy_unalign6 - strcpy_unaligned_branchtable)/2)
|
||||
.byte ((strcpy_unalign5 - strcpy_unaligned_branchtable)/2)
|
||||
.byte ((strcpy_unalign4 - strcpy_unaligned_branchtable)/2)
|
||||
.byte ((strcpy_unalign3 - strcpy_unaligned_branchtable)/2)
|
||||
.byte ((strcpy_unalign2 - strcpy_unaligned_branchtable)/2)
|
||||
.byte ((strcpy_unalign1 - strcpy_unaligned_branchtable)/2)
|
||||
|
||||
.p2align 2
|
||||
// Can read 7 bytes before possibly crossing a page.
|
||||
strcpy_unalign7:
|
||||
ldr r2, [r1], #4
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_first_register
|
||||
|
||||
ldrb r3, [r1]
|
||||
cbz r3, strcpy_unalign7_copy5bytes
|
||||
ldrb r4, [r1, #1]
|
||||
cbz r4, strcpy_unalign7_copy6bytes
|
||||
ldrb r5, [r1, #2]
|
||||
cbz r5, strcpy_unalign7_copy7bytes
|
||||
|
||||
ldr r3, [r1], #4
|
||||
pld [r1, #64]
|
||||
|
||||
lsrs ip, r3, #24
|
||||
stmia r0!, {r2, r3}
|
||||
beq strcpy_unalign_return
|
||||
b strcpy_unalign7
|
||||
|
||||
strcpy_unalign7_copy5bytes:
|
||||
stmia r0!, {r2}
|
||||
strb r3, [r0]
|
||||
strcpy_unalign_return:
|
||||
m_ret inst=pop
|
||||
|
||||
strcpy_unalign7_copy6bytes:
|
||||
stmia r0!, {r2}
|
||||
strb r3, [r0], #1
|
||||
strb r4, [r0], #1
|
||||
m_ret inst=pop
|
||||
|
||||
strcpy_unalign7_copy7bytes:
|
||||
stmia r0!, {r2}
|
||||
strb r3, [r0], #1
|
||||
strb r4, [r0], #1
|
||||
strb r5, [r0], #1
|
||||
m_ret inst=pop
|
||||
|
||||
.p2align 2
|
||||
// Can read 6 bytes before possibly crossing a page.
|
||||
strcpy_unalign6:
|
||||
ldr r2, [r1], #4
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_first_register
|
||||
|
||||
ldrb r4, [r1]
|
||||
cbz r4, strcpy_unalign_copy5bytes
|
||||
ldrb r5, [r1, #1]
|
||||
cbz r5, strcpy_unalign_copy6bytes
|
||||
|
||||
ldr r3, [r1], #4
|
||||
pld [r1, #64]
|
||||
|
||||
tst r3, #0xff0000
|
||||
beq strcpy_unalign6_copy7bytes
|
||||
lsrs ip, r3, #24
|
||||
stmia r0!, {r2, r3}
|
||||
beq strcpy_unalign_return
|
||||
b strcpy_unalign6
|
||||
|
||||
strcpy_unalign6_copy7bytes:
|
||||
stmia r0!, {r2}
|
||||
strh r3, [r0], #2
|
||||
lsr r3, #16
|
||||
strb r3, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
.p2align 2
|
||||
// Can read 5 bytes before possibly crossing a page.
|
||||
strcpy_unalign5:
|
||||
ldr r2, [r1], #4
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_first_register
|
||||
|
||||
ldrb r4, [r1]
|
||||
cbz r4, strcpy_unalign_copy5bytes
|
||||
|
||||
ldr r3, [r1], #4
|
||||
|
||||
pld [r1, #64]
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_second_register
|
||||
|
||||
stmia r0!, {r2, r3}
|
||||
b strcpy_unalign5
|
||||
|
||||
strcpy_unalign_copy5bytes:
|
||||
stmia r0!, {r2}
|
||||
strb r4, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
strcpy_unalign_copy6bytes:
|
||||
stmia r0!, {r2}
|
||||
strb r4, [r0], #1
|
||||
strb r5, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
.p2align 2
|
||||
// Can read 4 bytes before possibly crossing a page.
|
||||
strcpy_unalign4:
|
||||
ldmia r1!, {r2}
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_first_register
|
||||
|
||||
ldmia r1!, {r3}
|
||||
pld [r1, #64]
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_second_register
|
||||
|
||||
stmia r0!, {r2, r3}
|
||||
b strcpy_unalign4
|
||||
|
||||
.p2align 2
|
||||
// Can read 3 bytes before possibly crossing a page.
|
||||
strcpy_unalign3:
|
||||
ldrb r2, [r1]
|
||||
cbz r2, strcpy_unalign3_copy1byte
|
||||
ldrb r3, [r1, #1]
|
||||
cbz r3, strcpy_unalign3_copy2bytes
|
||||
ldrb r4, [r1, #2]
|
||||
cbz r4, strcpy_unalign3_copy3bytes
|
||||
|
||||
ldr r2, [r1], #4
|
||||
ldr r3, [r1], #4
|
||||
|
||||
pld [r1, #64]
|
||||
|
||||
lsrs lr, r2, #24
|
||||
beq strcpy_unalign_copy4bytes
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_second_register
|
||||
|
||||
stmia r0!, {r2, r3}
|
||||
b strcpy_unalign3
|
||||
|
||||
strcpy_unalign3_copy1byte:
|
||||
strb r2, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
strcpy_unalign3_copy2bytes:
|
||||
strb r2, [r0], #1
|
||||
strb r3, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
strcpy_unalign3_copy3bytes:
|
||||
strb r2, [r0], #1
|
||||
strb r3, [r0], #1
|
||||
strb r4, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
.p2align 2
|
||||
// Can read 2 bytes before possibly crossing a page.
|
||||
strcpy_unalign2:
|
||||
ldrb r2, [r1]
|
||||
cbz r2, strcpy_unalign_copy1byte
|
||||
ldrb r3, [r1, #1]
|
||||
cbz r3, strcpy_unalign_copy2bytes
|
||||
|
||||
ldr r2, [r1], #4
|
||||
ldr r3, [r1], #4
|
||||
pld [r1, #64]
|
||||
|
||||
tst r2, #0xff0000
|
||||
beq strcpy_unalign_copy3bytes
|
||||
lsrs ip, r2, #24
|
||||
beq strcpy_unalign_copy4bytes
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_second_register
|
||||
|
||||
stmia r0!, {r2, r3}
|
||||
b strcpy_unalign2
|
||||
|
||||
.p2align 2
|
||||
// Can read 1 byte before possibly crossing a page.
|
||||
strcpy_unalign1:
|
||||
ldrb r2, [r1]
|
||||
cbz r2, strcpy_unalign_copy1byte
|
||||
|
||||
ldr r2, [r1], #4
|
||||
ldr r3, [r1], #4
|
||||
|
||||
pld [r1, #64]
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_first_register
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne strcpy_zero_in_second_register
|
||||
|
||||
stmia r0!, {r2, r3}
|
||||
b strcpy_unalign1
|
||||
|
||||
strcpy_unalign_copy1byte:
|
||||
strb r2, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
strcpy_unalign_copy2bytes:
|
||||
strb r2, [r0], #1
|
||||
strb r3, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
strcpy_unalign_copy3bytes:
|
||||
strh r2, [r0], #2
|
||||
lsr r2, #16
|
||||
strb r2, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
strcpy_unalign_copy4bytes:
|
||||
stmia r0, {r2}
|
||||
m_ret inst=pop
|
||||
END(strcpy)
|
||||
#define STRCPY
|
||||
#include "string_copy.S"
|
||||
|
535
libc/arch-arm/cortex-a9/bionic/string_copy.S
Normal file
535
libc/arch-arm/cortex-a9/bionic/string_copy.S
Normal file
@@ -0,0 +1,535 @@
|
||||
/*
|
||||
* Copyright (C) 2013 The Android Open Source Project
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2013 ARM Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the company may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if !defined(STPCPY) && !defined(STRCPY)
|
||||
#error "Either STPCPY or STRCPY must be defined."
|
||||
#endif
|
||||
|
||||
#include <private/bionic_asm.h>
|
||||
|
||||
.syntax unified
|
||||
|
||||
.thumb
|
||||
.thumb_func
|
||||
|
||||
#if defined(STPCPY)
|
||||
.macro m_push
|
||||
push {r4, r5, lr}
|
||||
.cfi_def_cfa_offset 12
|
||||
.cfi_rel_offset r4, 0
|
||||
.cfi_rel_offset r5, 4
|
||||
.cfi_rel_offset lr, 8
|
||||
.endm // m_push
|
||||
#else
|
||||
.macro m_push
|
||||
push {r0, r4, r5, lr}
|
||||
.cfi_def_cfa_offset 16
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset r4, 4
|
||||
.cfi_rel_offset r5, 8
|
||||
.cfi_rel_offset lr, 12
|
||||
.endm // m_push
|
||||
#endif
|
||||
|
||||
#if defined(STPCPY)
|
||||
.macro m_ret inst
|
||||
\inst {r4, r5, pc}
|
||||
.endm // m_ret
|
||||
#else
|
||||
.macro m_ret inst
|
||||
\inst {r0, r4, r5, pc}
|
||||
.endm // m_ret
|
||||
#endif
|
||||
|
||||
.macro m_copy_byte reg, cmd, label
|
||||
ldrb \reg, [r1], #1
|
||||
strb \reg, [r0], #1
|
||||
\cmd \reg, \label
|
||||
.endm // m_copy_byte
|
||||
|
||||
#if defined(STPCPY)
|
||||
ENTRY(stpcpy)
|
||||
#else
|
||||
ENTRY(strcpy)
|
||||
#endif
|
||||
// Unroll the first 8 bytes that will be copied.
|
||||
m_push
|
||||
m_copy_byte reg=r2, cmd=cbz, label=.Lstringcopy_finish
|
||||
m_copy_byte reg=r3, cmd=cbz, label=.Lstringcopy_finish
|
||||
m_copy_byte reg=r4, cmd=cbz, label=.Lstringcopy_finish
|
||||
m_copy_byte reg=r5, cmd=cbz, label=.Lstringcopy_finish
|
||||
m_copy_byte reg=r2, cmd=cbz, label=.Lstringcopy_finish
|
||||
m_copy_byte reg=r3, cmd=cbz, label=.Lstringcopy_finish
|
||||
m_copy_byte reg=r4, cmd=cbz, label=.Lstringcopy_finish
|
||||
m_copy_byte reg=r5, cmd=cbnz, label=.Lstringcopy_continue
|
||||
|
||||
.Lstringcopy_finish:
|
||||
#if defined(STPCPY)
|
||||
sub r0, r0, #1
|
||||
#endif
|
||||
m_ret inst=pop
|
||||
|
||||
.Lstringcopy_continue:
|
||||
pld [r1, #0]
|
||||
ands r3, r0, #7
|
||||
bne .Lstringcopy_align_dst
|
||||
|
||||
.Lstringcopy_check_src_align:
|
||||
// At this point dst is aligned to a double word, check if src
|
||||
// is also aligned to a double word.
|
||||
ands r3, r1, #7
|
||||
bne .Lstringcopy_unaligned_copy
|
||||
|
||||
.p2align 2
|
||||
.Lstringcopy_mainloop:
|
||||
ldmia r1!, {r2, r3}
|
||||
|
||||
pld [r1, #64]
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_first_register
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_second_register
|
||||
|
||||
stmia r0!, {r2, r3}
|
||||
b .Lstringcopy_mainloop
|
||||
|
||||
.Lstringcopy_zero_in_first_register:
|
||||
lsls lr, ip, #17
|
||||
itt ne
|
||||
strbne r2, [r0]
|
||||
m_ret inst=popne
|
||||
itt cs
|
||||
#if defined(STPCPY)
|
||||
strhcs r2, [r0], #1
|
||||
#else
|
||||
strhcs r2, [r0]
|
||||
#endif
|
||||
m_ret inst=popcs
|
||||
lsls ip, ip, #1
|
||||
itt eq
|
||||
#if defined(STPCPY)
|
||||
streq r2, [r0], #3
|
||||
#else
|
||||
streq r2, [r0]
|
||||
#endif
|
||||
m_ret inst=popeq
|
||||
strh r2, [r0], #2
|
||||
lsr r3, r2, #16
|
||||
strb r3, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
.Lstringcopy_zero_in_second_register:
|
||||
lsls lr, ip, #17
|
||||
ittt ne
|
||||
stmiane r0!, {r2}
|
||||
strbne r3, [r0]
|
||||
m_ret inst=popne
|
||||
ittt cs
|
||||
strcs r2, [r0], #4
|
||||
#if defined(STPCPY)
|
||||
strhcs r3, [r0], #1
|
||||
#else
|
||||
strhcs r3, [r0]
|
||||
#endif
|
||||
m_ret inst=popcs
|
||||
lsls ip, ip, #1
|
||||
#if defined(STPCPY)
|
||||
ittt eq
|
||||
#else
|
||||
itt eq
|
||||
#endif
|
||||
stmiaeq r0, {r2, r3}
|
||||
#if defined(STPCPY)
|
||||
addeq r0, r0, #7
|
||||
#endif
|
||||
m_ret inst=popeq
|
||||
stmia r0!, {r2}
|
||||
strh r3, [r0], #2
|
||||
lsr r4, r3, #16
|
||||
strb r4, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
.Lstringcopy_align_dst:
|
||||
// Align to a double word (64 bits).
|
||||
rsb r3, r3, #8
|
||||
lsls ip, r3, #31
|
||||
beq .Lstringcopy_align_to_32
|
||||
|
||||
ldrb r2, [r1], #1
|
||||
strb r2, [r0], #1
|
||||
cbz r2, .Lstringcopy_complete
|
||||
|
||||
.Lstringcopy_align_to_32:
|
||||
bcc .Lstringcopy_align_to_64
|
||||
|
||||
ldrb r4, [r1], #1
|
||||
strb r4, [r0], #1
|
||||
cmp r4, #0
|
||||
#if defined(STPCPY)
|
||||
itt eq
|
||||
subeq r0, r0, #1
|
||||
#else
|
||||
it eq
|
||||
#endif
|
||||
m_ret inst=popeq
|
||||
ldrb r5, [r1], #1
|
||||
strb r5, [r0], #1
|
||||
cmp r5, #0
|
||||
#if defined(STPCPY)
|
||||
itt eq
|
||||
subeq r0, r0, #1
|
||||
#else
|
||||
it eq
|
||||
#endif
|
||||
m_ret inst=popeq
|
||||
|
||||
.Lstringcopy_align_to_64:
|
||||
tst r3, #4
|
||||
beq .Lstringcopy_check_src_align
|
||||
ldr r2, [r1], #4
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_first_register
|
||||
stmia r0!, {r2}
|
||||
b .Lstringcopy_check_src_align
|
||||
|
||||
.Lstringcopy_complete:
|
||||
#if defined(STPCPY)
|
||||
sub r0, r0, #1
|
||||
#endif
|
||||
m_ret inst=pop
|
||||
|
||||
.Lstringcopy_unaligned_copy:
|
||||
// Dst is aligned to a double word, while src is at an unknown alignment.
|
||||
// There are 7 different versions of the unaligned copy code
|
||||
// to prevent overreading the src. The mainloop of every single version
|
||||
// will store 64 bits per loop. The difference is how much of src can
|
||||
// be read without potentially crossing a page boundary.
|
||||
tbb [pc, r3]
|
||||
.Lstringcopy_unaligned_branchtable:
|
||||
.byte 0
|
||||
.byte ((.Lstringcopy_unalign7 - .Lstringcopy_unaligned_branchtable)/2)
|
||||
.byte ((.Lstringcopy_unalign6 - .Lstringcopy_unaligned_branchtable)/2)
|
||||
.byte ((.Lstringcopy_unalign5 - .Lstringcopy_unaligned_branchtable)/2)
|
||||
.byte ((.Lstringcopy_unalign4 - .Lstringcopy_unaligned_branchtable)/2)
|
||||
.byte ((.Lstringcopy_unalign3 - .Lstringcopy_unaligned_branchtable)/2)
|
||||
.byte ((.Lstringcopy_unalign2 - .Lstringcopy_unaligned_branchtable)/2)
|
||||
.byte ((.Lstringcopy_unalign1 - .Lstringcopy_unaligned_branchtable)/2)
|
||||
|
||||
.p2align 2
|
||||
// Can read 7 bytes before possibly crossing a page.
|
||||
.Lstringcopy_unalign7:
|
||||
ldr r2, [r1], #4
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_first_register
|
||||
|
||||
ldrb r3, [r1]
|
||||
cbz r3, .Lstringcopy_unalign7_copy5bytes
|
||||
ldrb r4, [r1, #1]
|
||||
cbz r4, .Lstringcopy_unalign7_copy6bytes
|
||||
ldrb r5, [r1, #2]
|
||||
cbz r5, .Lstringcopy_unalign7_copy7bytes
|
||||
|
||||
ldr r3, [r1], #4
|
||||
pld [r1, #64]
|
||||
|
||||
lsrs ip, r3, #24
|
||||
stmia r0!, {r2, r3}
|
||||
#if defined(STPCPY)
|
||||
beq .Lstringcopy_finish
|
||||
#else
|
||||
beq .Lstringcopy_unalign_return
|
||||
#endif
|
||||
b .Lstringcopy_unalign7
|
||||
|
||||
.Lstringcopy_unalign7_copy5bytes:
|
||||
stmia r0!, {r2}
|
||||
strb r3, [r0]
|
||||
.Lstringcopy_unalign_return:
|
||||
m_ret inst=pop
|
||||
|
||||
.Lstringcopy_unalign7_copy6bytes:
|
||||
stmia r0!, {r2}
|
||||
strb r3, [r0], #1
|
||||
strb r4, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
.Lstringcopy_unalign7_copy7bytes:
|
||||
stmia r0!, {r2}
|
||||
strb r3, [r0], #1
|
||||
strb r4, [r0], #1
|
||||
strb r5, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
.p2align 2
|
||||
// Can read 6 bytes before possibly crossing a page.
|
||||
.Lstringcopy_unalign6:
|
||||
ldr r2, [r1], #4
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_first_register
|
||||
|
||||
ldrb r4, [r1]
|
||||
cbz r4, .Lstringcopy_unalign_copy5bytes
|
||||
ldrb r5, [r1, #1]
|
||||
cbz r5, .Lstringcopy_unalign_copy6bytes
|
||||
|
||||
ldr r3, [r1], #4
|
||||
pld [r1, #64]
|
||||
|
||||
tst r3, #0xff0000
|
||||
beq .Lstringcopy_unalign6_copy7bytes
|
||||
lsrs ip, r3, #24
|
||||
stmia r0!, {r2, r3}
|
||||
#if defined(STPCPY)
|
||||
beq .Lstringcopy_finish
|
||||
#else
|
||||
beq .Lstringcopy_unalign_return
|
||||
#endif
|
||||
b .Lstringcopy_unalign6
|
||||
|
||||
.Lstringcopy_unalign6_copy7bytes:
|
||||
stmia r0!, {r2}
|
||||
strh r3, [r0], #2
|
||||
lsr r3, #16
|
||||
strb r3, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
.p2align 2
|
||||
// Can read 5 bytes before possibly crossing a page.
|
||||
.Lstringcopy_unalign5:
|
||||
ldr r2, [r1], #4
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_first_register
|
||||
|
||||
ldrb r4, [r1]
|
||||
cbz r4, .Lstringcopy_unalign_copy5bytes
|
||||
|
||||
ldr r3, [r1], #4
|
||||
|
||||
pld [r1, #64]
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_second_register
|
||||
|
||||
stmia r0!, {r2, r3}
|
||||
b .Lstringcopy_unalign5
|
||||
|
||||
.Lstringcopy_unalign_copy5bytes:
|
||||
stmia r0!, {r2}
|
||||
strb r4, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
.Lstringcopy_unalign_copy6bytes:
|
||||
stmia r0!, {r2}
|
||||
strb r4, [r0], #1
|
||||
strb r5, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
.p2align 2
|
||||
// Can read 4 bytes before possibly crossing a page.
|
||||
.Lstringcopy_unalign4:
|
||||
ldmia r1!, {r2}
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_first_register
|
||||
|
||||
ldmia r1!, {r3}
|
||||
pld [r1, #64]
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_second_register
|
||||
|
||||
stmia r0!, {r2, r3}
|
||||
b .Lstringcopy_unalign4
|
||||
|
||||
.p2align 2
|
||||
// Can read 3 bytes before possibly crossing a page.
|
||||
.Lstringcopy_unalign3:
|
||||
ldrb r2, [r1]
|
||||
cbz r2, .Lstringcopy_unalign3_copy1byte
|
||||
ldrb r3, [r1, #1]
|
||||
cbz r3, .Lstringcopy_unalign3_copy2bytes
|
||||
ldrb r4, [r1, #2]
|
||||
cbz r4, .Lstringcopy_unalign3_copy3bytes
|
||||
|
||||
ldr r2, [r1], #4
|
||||
ldr r3, [r1], #4
|
||||
|
||||
pld [r1, #64]
|
||||
|
||||
lsrs lr, r2, #24
|
||||
beq .Lstringcopy_unalign_copy4bytes
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_second_register
|
||||
|
||||
stmia r0!, {r2, r3}
|
||||
b .Lstringcopy_unalign3
|
||||
|
||||
.Lstringcopy_unalign3_copy1byte:
|
||||
strb r2, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
.Lstringcopy_unalign3_copy2bytes:
|
||||
strb r2, [r0], #1
|
||||
strb r3, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
.Lstringcopy_unalign3_copy3bytes:
|
||||
strb r2, [r0], #1
|
||||
strb r3, [r0], #1
|
||||
strb r4, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
.p2align 2
|
||||
// Can read 2 bytes before possibly crossing a page.
|
||||
.Lstringcopy_unalign2:
|
||||
ldrb r2, [r1]
|
||||
cbz r2, .Lstringcopy_unalign_copy1byte
|
||||
ldrb r3, [r1, #1]
|
||||
cbz r3, .Lstringcopy_unalign_copy2bytes
|
||||
|
||||
ldr r2, [r1], #4
|
||||
ldr r3, [r1], #4
|
||||
pld [r1, #64]
|
||||
|
||||
tst r2, #0xff0000
|
||||
beq .Lstringcopy_unalign_copy3bytes
|
||||
lsrs ip, r2, #24
|
||||
beq .Lstringcopy_unalign_copy4bytes
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_second_register
|
||||
|
||||
stmia r0!, {r2, r3}
|
||||
b .Lstringcopy_unalign2
|
||||
|
||||
.p2align 2
|
||||
// Can read 1 byte before possibly crossing a page.
|
||||
.Lstringcopy_unalign1:
|
||||
ldrb r2, [r1]
|
||||
cbz r2, .Lstringcopy_unalign_copy1byte
|
||||
|
||||
ldr r2, [r1], #4
|
||||
ldr r3, [r1], #4
|
||||
|
||||
pld [r1, #64]
|
||||
|
||||
sub ip, r2, #0x01010101
|
||||
bic ip, ip, r2
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_first_register
|
||||
|
||||
sub ip, r3, #0x01010101
|
||||
bic ip, ip, r3
|
||||
ands ip, ip, #0x80808080
|
||||
bne .Lstringcopy_zero_in_second_register
|
||||
|
||||
stmia r0!, {r2, r3}
|
||||
b .Lstringcopy_unalign1
|
||||
|
||||
.Lstringcopy_unalign_copy1byte:
|
||||
strb r2, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
.Lstringcopy_unalign_copy2bytes:
|
||||
strb r2, [r0], #1
|
||||
strb r3, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
.Lstringcopy_unalign_copy3bytes:
|
||||
strh r2, [r0], #2
|
||||
lsr r2, #16
|
||||
strb r2, [r0]
|
||||
m_ret inst=pop
|
||||
|
||||
.Lstringcopy_unalign_copy4bytes:
|
||||
stmia r0, {r2}
|
||||
#if defined(STPCPY)
|
||||
add r0, r0, #3
|
||||
#endif
|
||||
m_ret inst=pop
|
||||
#if defined(STPCPY)
|
||||
END(stpcpy)
|
||||
#else
|
||||
END(strcpy)
|
||||
#endif
|
@@ -1,10 +1,11 @@
|
||||
libc_bionic_src_files_arm += \
|
||||
arch-arm/cortex-a9/bionic/memcpy.S \
|
||||
arch-arm/cortex-a9/bionic/memset.S \
|
||||
arch-arm/cortex-a9/bionic/stpcpy.S \
|
||||
arch-arm/cortex-a9/bionic/strcat.S \
|
||||
arch-arm/cortex-a9/bionic/__strcat_chk.S \
|
||||
arch-arm/cortex-a9/bionic/strcmp.S \
|
||||
arch-arm/cortex-a9/bionic/strcpy.S \
|
||||
arch-arm/cortex-a9/bionic/strlen.S \
|
||||
arch-arm/cortex-a9/bionic/__strcat_chk.S \
|
||||
arch-arm/cortex-a9/bionic/__strcpy_chk.S \
|
||||
arch-arm/cortex-a9/bionic/strlen.S \
|
||||
bionic/memmove.c \
|
||||
|
@@ -40,12 +40,10 @@
|
||||
ENTRY(__strcat_chk)
|
||||
pld [r0, #0]
|
||||
push {r0, lr}
|
||||
.save {r0, lr}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
push {r4, r5}
|
||||
.save {r4, r5}
|
||||
.cfi_adjust_cfa_offset 8
|
||||
.cfi_rel_offset r4, 0
|
||||
.cfi_rel_offset r5, 4
|
||||
@@ -195,9 +193,6 @@ END(__strcat_chk)
|
||||
#include "memcpy_base.S"
|
||||
|
||||
ENTRY_PRIVATE(__strcat_chk_failed)
|
||||
.save {r0, lr}
|
||||
.save {r4, r5}
|
||||
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
|
@@ -39,7 +39,6 @@
|
||||
ENTRY(__strcpy_chk)
|
||||
pld [r0, #0]
|
||||
push {r0, lr}
|
||||
.save {r0, lr}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
@@ -161,7 +160,6 @@ END(__strcpy_chk)
|
||||
#include "memcpy_base.S"
|
||||
|
||||
ENTRY_PRIVATE(__strcpy_chk_failed)
|
||||
.save {r0, lr}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
|
@@ -72,7 +72,6 @@ END(__memcpy_chk)
|
||||
ENTRY(memcpy)
|
||||
pld [r1, #64]
|
||||
push {r0, lr}
|
||||
.save {r0, lr}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
@@ -85,7 +84,6 @@ END(memcpy)
|
||||
ENTRY_PRIVATE(__memcpy_chk_fail)
|
||||
// Preserve lr for backtrace.
|
||||
push {lr}
|
||||
.save {lr}
|
||||
.cfi_def_cfa_offset 4
|
||||
.cfi_rel_offset lr, 0
|
||||
|
||||
|
@@ -7,7 +7,8 @@ libc_bionic_src_files_arm += \
|
||||
|
||||
# Use cortex-a15 versions of strcat/strcpy/strlen.
|
||||
libc_bionic_src_files_arm += \
|
||||
arch-arm/cortex-a15/bionic/stpcpy.S \
|
||||
arch-arm/cortex-a15/bionic/strcat.S \
|
||||
arch-arm/cortex-a15/bionic/strcmp.S \
|
||||
arch-arm/cortex-a15/bionic/strcpy.S \
|
||||
arch-arm/cortex-a15/bionic/strlen.S \
|
||||
arch-arm/cortex-a15/bionic/strcmp.S \
|
||||
|
@@ -7,4 +7,5 @@ libc_bionic_src_files_arm += \
|
||||
bionic/memmove.c \
|
||||
bionic/__strcat_chk.cpp \
|
||||
bionic/__strcpy_chk.cpp \
|
||||
upstream-openbsd/lib/libc/string/stpcpy.c \
|
||||
upstream-openbsd/lib/libc/string/strcat.c \
|
||||
|
@@ -38,9 +38,7 @@
|
||||
#ifndef _ARM32_ASM_H_
|
||||
#define _ARM32_ASM_H_
|
||||
|
||||
#ifndef _ALIGN_TEXT
|
||||
# define _ALIGN_TEXT .align 0
|
||||
#endif
|
||||
#define __bionic_asm_align 0
|
||||
|
||||
#undef __bionic_asm_custom_entry
|
||||
#undef __bionic_asm_custom_end
|
||||
@@ -50,10 +48,4 @@
|
||||
#undef __bionic_asm_function_type
|
||||
#define __bionic_asm_function_type #function
|
||||
|
||||
#if defined(__ELF__) && defined(PIC)
|
||||
#define PIC_SYM(x,y) x ## ( ## y ## )
|
||||
#else
|
||||
#define PIC_SYM(x,y) x
|
||||
#endif
|
||||
|
||||
#endif /* !_ARM_ASM_H_ */
|
||||
|
@@ -40,12 +40,10 @@
|
||||
ENTRY(__strcat_chk)
|
||||
pld [r0, #0]
|
||||
push {r0, lr}
|
||||
.save {r0, lr}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
push {r4, r5}
|
||||
.save {r4, r5}
|
||||
.cfi_adjust_cfa_offset 8
|
||||
.cfi_rel_offset r4, 0
|
||||
.cfi_rel_offset r5, 4
|
||||
@@ -194,8 +192,6 @@ END(__strcat_chk)
|
||||
#include "memcpy_base.S"
|
||||
|
||||
ENTRY_PRIVATE(__strcat_chk_failed)
|
||||
.save {r0, lr}
|
||||
.save {r4, r5}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
|
@@ -39,7 +39,6 @@
|
||||
ENTRY(__strcpy_chk)
|
||||
pld [r0, #0]
|
||||
push {r0, lr}
|
||||
.save {r0, lr}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
@@ -161,7 +160,6 @@ END(__strcpy_chk)
|
||||
#include "memcpy_base.S"
|
||||
|
||||
ENTRY_PRIVATE(__strcpy_chk_failed)
|
||||
.save {r0, lr}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
|
@@ -53,7 +53,6 @@ END(__memcpy_chk)
|
||||
ENTRY(memcpy)
|
||||
pld [r1, #64]
|
||||
stmfd sp!, {r0, lr}
|
||||
.save {r0, lr}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
@@ -66,7 +65,6 @@ END(memcpy)
|
||||
ENTRY_PRIVATE(__memcpy_chk_fail)
|
||||
// Preserve lr for backtrace.
|
||||
push {lr}
|
||||
.save {lr}
|
||||
.cfi_def_cfa_offset 4
|
||||
.cfi_rel_offset lr, 0
|
||||
|
||||
|
@@ -36,7 +36,6 @@
|
||||
// Assumes neon instructions and a cache line size of 32 bytes.
|
||||
|
||||
ENTRY_PRIVATE(MEMCPY_BASE)
|
||||
.save {r0, lr}
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_rel_offset r0, 0
|
||||
.cfi_rel_offset lr, 4
|
||||
|
@@ -43,7 +43,6 @@ ENTRY(__memset_chk)
|
||||
bls .L_done
|
||||
|
||||
// Preserve lr for backtrace.
|
||||
.save {lr}
|
||||
push {lr}
|
||||
.cfi_def_cfa_offset 4
|
||||
.cfi_rel_offset lr, 0
|
||||
@@ -69,7 +68,6 @@ END(bzero)
|
||||
|
||||
/* memset() returns its first argument. */
|
||||
ENTRY(memset)
|
||||
.save {r0}
|
||||
stmfd sp!, {r0}
|
||||
.cfi_def_cfa_offset 4
|
||||
.cfi_rel_offset r0, 0
|
||||
|
@@ -168,7 +168,6 @@ ENTRY(strcmp)
|
||||
bne .L_do_align
|
||||
|
||||
/* Fast path. */
|
||||
.save {r4-r7}
|
||||
init
|
||||
|
||||
.L_doubleword_aligned:
|
||||
|
@@ -7,6 +7,7 @@ libc_bionic_src_files_arm += \
|
||||
|
||||
# Use cortex-a15 versions of strcat/strcpy/strlen and standard memmove
|
||||
libc_bionic_src_files_arm += \
|
||||
arch-arm/cortex-a15/bionic/stpcpy.S \
|
||||
arch-arm/cortex-a15/bionic/strcat.S \
|
||||
arch-arm/cortex-a15/bionic/strcpy.S \
|
||||
arch-arm/cortex-a15/bionic/strlen.S \
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__accept4)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__accept4)
|
||||
|
22
libc/arch-arm/syscalls/__arm_fadvise64_64.S
Normal file
22
libc/arch-arm/syscalls/__arm_fadvise64_64.S
Normal file
@@ -0,0 +1,22 @@
|
||||
/* Generated by gensyscalls.py. Do not edit. */
|
||||
|
||||
#include <private/bionic_asm.h>
|
||||
|
||||
ENTRY(__arm_fadvise64_64)
|
||||
mov ip, sp
|
||||
stmfd sp!, {r4, r5, r6, r7}
|
||||
.cfi_def_cfa_offset 16
|
||||
.cfi_rel_offset r4, 0
|
||||
.cfi_rel_offset r5, 4
|
||||
.cfi_rel_offset r6, 8
|
||||
.cfi_rel_offset r7, 12
|
||||
ldmfd ip, {r4, r5, r6}
|
||||
ldr r7, =__NR_arm_fadvise64_64
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r5, r6, r7}
|
||||
.cfi_def_cfa_offset 0
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno_internal
|
||||
END(__arm_fadvise64_64)
|
@@ -10,5 +10,5 @@ ENTRY(__brk)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__brk)
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <private/bionic_asm.h>
|
||||
|
||||
ENTRY(clock_nanosleep)
|
||||
ENTRY(__clock_nanosleep)
|
||||
mov ip, r7
|
||||
ldr r7, =__NR_clock_nanosleep
|
||||
swi #0
|
||||
@@ -10,5 +10,5 @@ ENTRY(clock_nanosleep)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
END(clock_nanosleep)
|
||||
b __set_errno_internal
|
||||
END(__clock_nanosleep)
|
@@ -10,5 +10,5 @@ ENTRY(__connect)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__connect)
|
||||
|
@@ -18,5 +18,5 @@ ENTRY(__epoll_pwait)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__epoll_pwait)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__exit)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__exit)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__fcntl64)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__fcntl64)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__fstatfs64)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__fstatfs64)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__getcpu)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__getcpu)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__getcwd)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__getcwd)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__getdents64)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__getdents64)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__getpid)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__getpid)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__getpriority)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__getpriority)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__ioctl)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__ioctl)
|
||||
|
@@ -18,5 +18,5 @@ ENTRY(__llseek)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__llseek)
|
||||
|
@@ -18,5 +18,5 @@ ENTRY(__mmap2)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__mmap2)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__openat)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__openat)
|
||||
|
@@ -18,5 +18,5 @@ ENTRY(__ppoll)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__ppoll)
|
||||
|
@@ -18,5 +18,5 @@ ENTRY(__pselect6)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__pselect6)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__ptrace)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__ptrace)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__reboot)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__reboot)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__rt_sigaction)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__rt_sigaction)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__rt_sigpending)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__rt_sigpending)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__rt_sigprocmask)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__rt_sigprocmask)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__rt_sigsuspend)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__rt_sigsuspend)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__rt_sigtimedwait)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__rt_sigtimedwait)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__sched_getaffinity)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__sched_getaffinity)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__set_tid_address)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__set_tid_address)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__set_tls)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__set_tls)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__sigaction)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__sigaction)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__signalfd4)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__signalfd4)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__socket)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__socket)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__statfs64)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__statfs64)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__timer_create)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__timer_create)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__timer_delete)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__timer_delete)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__timer_getoverrun)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__timer_getoverrun)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__timer_gettime)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__timer_gettime)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(__timer_settime)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__timer_settime)
|
||||
|
@@ -18,5 +18,5 @@ ENTRY(__waitid)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(__waitid)
|
||||
|
@@ -10,7 +10,7 @@ ENTRY(_exit)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(_exit)
|
||||
|
||||
.globl _Exit
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(acct)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(acct)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(bind)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(bind)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(cacheflush)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(cacheflush)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(capget)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(capget)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(capset)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(capset)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(chdir)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(chdir)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(chroot)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(chroot)
|
||||
|
@@ -10,5 +10,5 @@ ENTRY(clock_getres)
|
||||
cmn r0, #(MAX_ERRNO + 1)
|
||||
bxls lr
|
||||
neg r0, r0
|
||||
b __set_errno
|
||||
b __set_errno_internal
|
||||
END(clock_getres)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user