From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24173 invoked by alias); 19 Aug 2009 14:35:37 -0000 Received: (qmail 24162 invoked by uid 22791); 19 Aug 2009 14:35:36 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_43,J_CHICKENPOX_63,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from moutng.kundenserver.de (HELO moutng.kundenserver.de) (212.227.126.171) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 19 Aug 2009 14:35:29 +0000 Received: from intranator.net.lan (p57AB9D5E.dip0.t-ipconnect.de [87.171.157.94]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MKv5w-1MdmG41zk4-0004dM; Wed, 19 Aug 2009 16:35:24 +0200 Received: from localhost (intranator.net.lan [127.0.0.1]) by localhost (Postfix) with ESMTP id 43F9C1A7 for ; Wed, 19 Aug 2009 16:35:23 +0200 (CEST) Received: from [192.168.101.21] (software-mob01.net.lan [192.168.101.21]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: smtp-auth-user) by intranator.net.lan (Postfix) with ESMTPSA id C5EF3161; Wed, 19 Aug 2009 16:35:13 +0200 (CEST) Message-ID: <4A8C0D9B.1010406@cetoni.de> Date: Wed, 19 Aug 2009 14:35:00 -0000 From: cetoni GmbH - Uwe Kindler User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: ecos-devel@sourceware.org CC: Bart Veer , Sergei Gavrikov Subject: Re: Strange __cxa_pure_virtual problem Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2009-08/txt/msg00030.txt.bz2 Hi Bart, I compiled an eCos library from default template with arm-eabi toolchain from eCos homepage. These are teh compiler switches: -Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings -mno-thumb-interwork -mcpu=arm7tdmi -g2 -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions I used a makfile from examples directory to build my application and link againts the library. If I compile the following main file __cxa_guard_release() is not pulled in: class Simple { private: int m_i; public: Simple(int i) : m_i(i) {} }; static Simple simple(1); int main(int argc, char *argv[]) { return 0; } If I compile the following main file __cxa_guard_release() is pulled in: class Simple { private: int m_i; public: Simple(int i) : m_i(i) {} }; int main(int argc, char *argv[]) { static Simple simple(1); return 0; } I found a message from a mailing list with a similar problem: http://lists.apple.com/archives/darwin-drivers/2005/May/msg00061.html The message states: .... Evidently the compiler generates these as a by-product of the class instantiation. By moving the class instantiation out of the function, into global space, the symbols were not generated. ... So this seems like a compiler issue for me. You can easily confirm this behaviour by building my simple application. It is important to link against a debug build of the library (-g2 -O0) to reproduce this behaviour. Can anyone confirm that compiler behaviour of the arm-eabi toolchain? Sergei, can you reproduce this. Can you reproduce this with any other toolchain (x86)? Regards, Uwe