Hacker Newsnew | past | comments | ask | show | jobs | submitlogin



[nitpick mode]

What a misleading example. That's not GNU hello world, that's Linux hello world. The difference: it does not use GNU libc nor any other parts of GNU project -- except for the `unistd.h' -- but instead interfaces with the kernel directly.

Another matter is that it's not a C program, as it doesn't have int main(...) :P

[/nitpick mode]


>>does not use GNU libc nor any other parts of GNU project<<

On the contrary:

- The program is compiled with GCC

- "GCC development is a part of the GNU Project..."


That you used GCC is irrelevant; other compilers would give pretty much the same result. GCC is not required by the program by any means. Nothing of GCC is part of the program itself due to the -nostartfiles flag. The program doesn't use GCC, you (the software developer) do :-)

For sake of example, consider Linux (the kernel); usually compiled with GCC -- but ICC works as well -- and distributed under GPL, yet is not part of GNU project.

Moreover, the program in question can be ran directly on bare Linux, with no GNU stuff present anywhere, if passed via `init=PATH_TO_THE_PROGRAM' boot param. Of course the kernel would panic right after the syscall(__NR_exit, 0)... so I'm bailing out of nitpick mode right now ;-)


>> The program doesn't use GCC... <<

Before your kernel panic out of nitpick mode, shouldn't you at least have compiled and run that hello world program with ICC? ;-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: