Re: why asmlinkage is needed?

david parsons (linker@z.ml.org)
Sun, 16 Aug 1998 12:04:13 -0400 (EDT)


On 16 Aug 1998, Andi Kleen wrote:

> In article <199808160521.AAA25968@duracef.shout.net>,
> Michael Elizabeth Chastain <mec@shout.net> writes:
> > Hi Andreas,
> >> We don't compile the kernel with g++, so why is asmlinkage used
> >> somewhere in the kernel function declaration?
>
> > The asmlinkage is for the benefit of user-space C++ programs that
> > include kernel headers.
>
> Not really. System calls are called through the int 0x80 interface
> with stubs in the libc, and the user program never sees the internal
> kernel symbol table. Linux is not a DLL.
>
> asmlinkage is just a historical remnant from the great deays when Linux
> was writen in C++ (somewhere around 0.97 I think).
>
> -andi

Linux was never written in C++, it was compiled with G++ because of it's
stricter type checking.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html