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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
[1]quotes | [2]docs | [3]repo | [4]golang | [5]sam | [6]man | [7]acme |
[8]Glenda | [9]9times | [10]harmful | [11]9P | [12]cat-v.org
Related sites: | [13]site updates | [14]site map |
[15]Plan 9 and Inferno at the Google Summer of Code
* [16]> 2010 app
* [17]> FAQ
* [18]> News/
* [19]> about
* [20]> blog/
* [21]> hg/
* [22]> ideas/
* [23]> people/
* [24]» projects/
*
+ [25]> OLP9C/
+ [26]> cocytus/
+ [27]> inferno ceb/
+ [28]> inferno synth/
+ [29]» kencc/
+
o [30]> blog/
+ [31]> o9fs/
+ [32]> qemu/
+ [33]> synergy/
+ [34]> ventivac/
+ [35]> web9/
+ [36]> werc/
KenCC - Port of the Plan 9 compilers to *nix systems
The KenCC port is very usable at the moment. It can be found at
[37]http://gsoc.cat-v.org/hg/kenc and it comes in 6 parts:
8a The Plan 9 386 assembler.
8c The Plan 9 386 C compiler.
cc The portable portions of the C compiler.
8l The Plan 9 386 linker.
pcc A wrapper around the compilers and linkers with a more
POSIXy interface.
libcsu The C startup linkage, namely _main() and operations on
long long types not provided by the compiler.
The details: The linker will link Plan 9 .8 objects (binary 386
assembly language, as produced by the compiler and assembler), as well
as ELF objects, along with their debugging information. It will also
link agains ELF shared objects, though it can't yet create them (and it
doesn't walk the dependency tree). It also generates basic debugging
information (as much as the compilers provide) for .8 objects. It
provides line number, stack frame/unwind, and param/auto variable
location information (ELF objects come with whatever debugging info
their compiler generated). There is currently no type information (all
variables are represented as longs, unless cast otherwise), unless you
use acid, for which the compiler can generate native debugging info. I
intend on fixing this in the future.
I'd forgotten to upload the preprocessor, which only has one change,
the -P flag, which is used to preinclude the pcc.h file, which provides
varargck info for the POSIX formatted IO functions, and some defines to
get around some GCC specific gunk (incorrectly) in BSD header files.
In the future, I'd like to support type information in debugging,
PIC/SO generation, constructors/destructors (which seem totally inane
to me; only for the linker), variable length auth arrays (for Plan 9
too, for the sake of porting code), more object types (I've tried to
segregate the ELF related code; the BSDs still try to support COFF),
and some other bits I'm forgetting.
On supporting other object types, 8l used to do it. At first, I tried
to change as little as possible, but the code quickly became unwieldy,
so I restructured the linker to work on sections, all the way down the
line. The section related code should probably be made mostly ELF
independant so (say) COFF and Plan 9 objects can be generated with
little extra code (as it was before).
It would also be nice to port other archs. The ELF input/output code is
not intwined with other archs, but it's 32bit LEB specific. It would be
nice, I think, to structure the linker code like the compiler code, in
platform dependent and independent sections, since most of code
relating to object format is totally platform independent. The
compilers only required trivial changes (the register saving code was
done in the linker; the calling convention changes were not extensive,
and should be straightforward in the other compilers now that I've done
it once), so porting them should be simple and forthcoming. I'd like
very much for an AMD64 port, since it's becoming so prevalent. It
shouldn't be too difficult.
Note: for building kenc you will need Inferno's ar (iar), it can be
found in inferno-os/utils/iar/ at the [38]inferno-os repo.
[39]Powered by werc
____________________ Search
References
1. http://quotes.cat-v.org/
2. http://doc.cat-v.org/
3. http://repo.cat-v.org/
4. http://go-lang.cat-v.org/
5. http://sam.cat-v.org/
6. http://man.cat-v.org/
7. http://acme.cat-v.org/
8. http://glenda.cat-v.org/
9. http://ninetimes.cat-v.org/
10. http://harmful.cat-v.org/
11. http://9p.cat-v.org/
12. http://cat-v.org/
13. http://cat-v.org/update_log
14. http://gsoc.cat-v.org/sitemap
15. http://gsoc.cat-v.org/
16. http://gsoc.cat-v.org/2010-app
17. http://gsoc.cat-v.org/FAQ
18. http://gsoc.cat-v.org/News/
19. http://gsoc.cat-v.org/about
20. http://gsoc.cat-v.org/blog/
21. http://gsoc.cat-v.org/hg/
22. http://gsoc.cat-v.org/ideas/
23. http://gsoc.cat-v.org/people/
24. http://gsoc.cat-v.org/projects/
25. http://gsoc.cat-v.org/projects/OLP9C/
26. http://gsoc.cat-v.org/projects/cocytus/
27. http://gsoc.cat-v.org/projects/inferno-ceb/
28. http://gsoc.cat-v.org/projects/inferno-synth/
29. http://gsoc.cat-v.org/projects/kencc/
30. http://gsoc.cat-v.org/projects/kencc/blog/
31. http://gsoc.cat-v.org/projects/o9fs/
32. http://gsoc.cat-v.org/projects/qemu/
33. http://gsoc.cat-v.org/projects/synergy/
34. http://gsoc.cat-v.org/projects/ventivac/
35. http://gsoc.cat-v.org/projects/web9/
36. http://gsoc.cat-v.org/projects/werc/
37. http://gsoc.cat-v.org/hg/kenc
38. http://code.google.com/p/inferno-os/
39. http://werc.cat-v.org/
|