On Wed, 27 Aug 2003, Stephen Hemminger wrote:I absolutly agree with your opinion here. But due to the fact that the driver sources from the manufacturer where c++, a wrapper was easier (and the license of the driver is... restrictive I'm afraid...). But a rewrite in C is only a matter of time!
On 27 Aug 2003 16:59:38 +0100
Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wrote:
On Mer, 2003-08-27 at 16:34, LGW wrote:You did something that was explicitly not supported on 2.4 and it worked,
The driver is mostly a wrapper around a generic driver released by theThe new module loader is kernel side, it may well not know some of the
manufacturer, and that's written in C++. But it worked like this for the
2.4.x kernel series, so I think it has something todo with the new
module loader code. Possibly ld misses something when linking the object
specific stuff like constructors?
C++ specific relocation types.
it broke on 2.6.
The fact that it worked it all on 2.4 was a fluke.
It's time to breakdown, do the right thing and figure out how to rewrite/translate the
C++ code to C.
You did something that was explicitly not supported on 2.4 and it worked,^^^^^^^^^^^^^^^^^^^^^^^^_______ Yes!
There was lots of discussion/flames back-and-forth with newbies
requiring that modules be written in C++. This is what you get.
Some of the C++ built-ins are not even global so the linker
won't be able to find them if they are used. It's not just
a matter of emulating 'new'. Parameter-passing 'by reference' also
won't work so putting 'C' wrappers around stuff like they do
in Dr. Jobbs and C/C++ Journal isn't going to work inside
the kernel where there is no support.