-
Notifications
You must be signed in to change notification settings - Fork 2
/
test.txt
108 lines (83 loc) · 2.38 KB
/
test.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
Unless otherwise stated, these tests are on the official Google Android VM images (AVD). Both the -fPIE and the non-pie binaries are run, to verify they are able to link all symbols at runtime.
Problem: Android 2.3.3 ARM VM has an ARMv5 (ARM926EJ) based CPU, while the others have a Cortex-ish ARMv7
[1] Illegal instruction ./mosh-client.ar...
0x0006aecc in ?? ()
=> 0x6aecc: dmb sy
Solution: rebuilt the nopie binary with the "armeabi" libstdc++ instead of "armeabi-v7a"
Problem: WARNING: linker: ./mosh-client.x86.pie has text relocations. This is wasting memory and is a security risk. Please fix.
Solution: this comes from the TEXTREL flag (readelf -d mosh-client.x86.pie | grep TEXTREL), and a side effect of this PIE build on x86. Most platforms do not have linker debugging turned on, and do not show this message. The security risk is only during startup, when the text segments are unprotected in order to write the relocations in them. They are reprotected after relocation is completed.
===== ARM =====
== Android L
pie
mosh-client (mosh 1.2.2)
nopie
error: only position independent executables (PIE) are supported.
== Android 4.4.4 (CM11 nightly build)
verified pie binary on d2tmo hardware in irssiconnectbot
== Android 4.4.2
pie
mosh-client (mosh 1.2.2)
nopie
mosh-client (mosh 1.2.2)
== Android 4.3
pie
mosh-client (mosh 1.2.2)
nopie
mosh-client (mosh 1.2.2)
== Android 4.2.2
(also verified pie binary on emulator hardware in irssiconnectbot)
pie
mosh-client (mosh 1.2.2)
nopie
mosh-client (mosh 1.2.2)
== Android 4.1.2
pie
mosh-client (mosh 1.2.2)
nopie
mosh-client (mosh 1.2.2)
== Android 4.0.3
pie
[1] Segmentation fault ./mosh-client.ar...
nopie
mosh-client (mosh 1.2.2)
== Android 2.3.3
pie
[1] Segmentation fault ./mosh-client.ar...
nopie
mosh-client (mosh 1.2.2)
===== x86 =====
== Android L
pie
mosh-client (mosh 1.2.2)
nopie
error: only position independent executables (PIE) are supported.
== Android 4.4.2
pie
mosh-client (mosh 1.2.2)
nopie
mosh-client (mosh 1.2.2)
== Android 4.3
pie
mosh-client (mosh 1.2.2)
nopie
mosh-client (mosh 1.2.2)
== Android 4.2.2
pie
mosh-client (mosh 1.2.2)
nopie
mosh-client (mosh 1.2.2)
== Android 4.1.2
pie
mosh-client (mosh 1.2.2)
nopie
mosh-client (mosh 1.2.2)
== Android 4.0.3
pie
[1] Segmentation fault ./mosh-client.x8...
nopie
mosh-client (mosh 1.2.2)
== Android 2.3.3
pie
[hang]
nopie
mosh-client (mosh 1.2.2)