Re: Would I be violating the GPL?

From: Giuliano Pochini
Date: Wed Nov 02 2005 - 10:55:54 EST




On Wed, 2 Nov 2005, Alex Lyashkov wrote:

> > Linux 2.6 doesn't accept c++, so you have to rewrite it anyway.
> > You should ask them if you can publish your own driver based
> > on infos you extract from their driver.
> >
> without exeption c++ code can be used at drivers.

No, it can't. There is not support at all for c++ in the kernel. Even if
you don't use exceptions and you redefine all new() operators, when you
try to load the module it will not find several symbols that are defined
inside user space libraries. Under 2.4 I managed to use c++ code in a
module, but I had to define some 100% bogus symbols in the sources to make
the loader happy (those symbols are gcc- and architecture-dependent).
Furthermore, c++ code can crash because c++ hides too many things,
expecially temporary stuff which is allocated on the stack. Stack space in
*very* limited in kernel space. Finally, linux 2.6 do not permit loading
c++ code anymore.

--
Giuliano.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/