My question is somewhat weird but I will do my best to explain.
Looking at the languages the linux kernel has, I got C and assembly even though I read a text that said [quote] Second iteration of Unix is written completely in C [/quote]
I thought that was misleading but when I said that kernel has assembly code I got 2 questions of the start
- What assembly files are in the kernel and what's their use?
- Assembly is architecture dependant so how can linux be installed on more than one CPU architecture
And if linux kernel is truly written completely in C than how can it get GCC needed for compiling?
I did a complete find / -name *.s
and just got one assembly file (asm-offset.s) somewhere in the /usr/src/linux-headers-`uname -r
/
Somehow I don't think that is helping with the GCC working, so how can linux work without assembly or if it uses assembly where is it and how can it be stable when it depends on the arch.
Thanks in advance
arch
directory, for x86 they have the.S
(uppercase) extension. For example, the following link gives you the assembly source to implement VDSO on x86 lxr.free-electrons.com/source/arch/x86/vdso/vdso.S - amdn*.S
(capital) as those are assembly files too. The C code also has some inline assembly and other things that are not standard C, thus the gcc requirement. - Jester