1 |
On 6/1/16 11:35 PM, Lei Zhang wrote: |
2 |
> Hi, |
3 |
> |
4 |
> I'm the GSoC student working on building a clang + musl based toolchain. |
5 |
> Previous discussions on this project happened mostly between me and my |
6 |
> mentor Luca; but I think bringing them here may attract some constructive |
7 |
> thoughts. So, here it goes :) |
8 |
> |
9 |
> Currently I'm considering introducing a new ABI type "musl" into clang, so |
10 |
> we can build a native clang targeting "x86_64-linux-musl". But I notice |
11 |
> there's also an ABI type specifically for x32, named "gnux32". Then what |
12 |
> about musl on a x32 platform? Should I name it "muslx32" or something? I |
13 |
> don't know why x86 and x86_64 can live with the same ABI name, while x32 |
14 |
> can't... |
15 |
> |
16 |
> Thoughts? |
17 |
> |
18 |
> |
19 |
> Lei |
20 |
> |
21 |
|
22 |
1) i tried x32 + musl + gcc and ran into quite a few issues and gave up. |
23 |
i don't recall what those issues are right now, but they were basically |
24 |
lost of compile time breakage of packages. since i'm not a big fan of |
25 |
x32 i didn't put a lot of effort in and when i saw it was a steep climb, |
26 |
i had bigger fish to fry. |
27 |
|
28 |
2) i don't know what you mean by "should i name it muslx32". what is |
29 |
the "it" in your sentence? if its the the toolchain tuple, that should |
30 |
not contain the abi name in it because a given toolchain is able to emit |
31 |
different abis. for example gcc on x86_64 architecture can produce |
32 |
three abis (if the corresponding libc's are available): gcc -m32, gcc |
33 |
-m64, gcc -mx32 |
34 |
|
35 |
3) x32 is a 64-bit abi which limits the address space to 4G = 2^32. it |
36 |
is supposed to reduce memory footprint and run faster, but i'm not |
37 |
convinced it makes much difference in practice. this for me is offset |
38 |
by the fact that a smaller address space means weaker ASLR. exploits |
39 |
that depend on knowing the addresses of functions or pointers or other |
40 |
data object in memory will have less space to explore when brute |
41 |
forcing. so i'm not a fan of x32. |
42 |
|
43 |
|
44 |
-- |
45 |
Anthony G. Basile, Ph.D. |
46 |
Gentoo Linux Developer [Hardened] |
47 |
E-Mail : blueness@g.o |
48 |
GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA |
49 |
GnuPG ID : F52D4BBA |