Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760497AbYBHPzO (ORCPT ); Fri, 8 Feb 2008 10:55:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756642AbYBHPzB (ORCPT ); Fri, 8 Feb 2008 10:55:01 -0500 Received: from sovereign.computergmbh.de ([85.214.69.204]:55129 "EHLO sovereign.computergmbh.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756247AbYBHPzA (ORCPT ); Fri, 8 Feb 2008 10:55:00 -0500 Date: Fri, 8 Feb 2008 16:54:59 +0100 (CET) From: Jan Engelhardt To: Joonwoo Park cc: rohit h , linux-kernel@vger.kernel.org Subject: Re: [LINUX-KERNEL] C++ in linux kernel In-Reply-To: Message-ID: References: <90d987c0802072121v378da809l7b2690980566cd9@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 980 Lines: 25 On Feb 9 2008 00:14, Joonwoo Park wrote: >2008/2/8, rohit h : >> Hi, >> I am a kernel newbie. >> I tried to insmod a C++ module containing classes, inheritance. >> I am getting 'unresolved symbol' error when I use the 'new' keyword. >> What could the problem be? >> >> What kind of runtime support is needed ( arm linux kernel)? Is a >> patch available for it? >> >Please take a look at click modular router which is using c++ as a >linux kernel module. >http://www.read.cs.ucla.edu/click/ >The lib/glue.cc provides custom operator new. Uh, let's not make the world worse :) Just call malloc from C++, and carefully select what C++ features you are going to use. The VMware source for example does it right. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/