From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18473 invoked by alias); 28 Mar 2009 11:29:32 -0000 Received: (qmail 18456 invoked by uid 22791); 28 Mar 2009 11:29:31 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from exprod6og106.obsmtp.com (HELO exprod6og106.obsmtp.com) (64.18.1.191) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 28 Mar 2009 11:29:27 +0000 Received: from source ([192.150.8.22]) by exprod6ob106.postini.com ([64.18.5.12]) with SMTP ID DSNKSc4KE9ZrvPYypGF1xqiEVau8lxLoWAj2@postini.com; Sat, 28 Mar 2009 04:29:26 PDT Received: from inner-relay-1.corp.adobe.com ([153.32.1.51]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id n2SBTKE0015283; Sat, 28 Mar 2009 04:29:21 -0700 (PDT) Received: from nacas02.corp.adobe.com (nacas02.corp.adobe.com [10.8.189.100]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id n2SBTJiq014484; Sat, 28 Mar 2009 04:29:19 -0700 (PDT) Received: from nambx04.corp.adobe.com ([10.8.127.98]) by nacas02.corp.adobe.com ([10.8.189.100]) with mapi; Sat, 28 Mar 2009 04:29:19 -0700 From: "John (Eljay) Love-Jensen" To: John Farmer , "gcc-help@gcc.gnu.org" Date: Sat, 28 Mar 2009 11:29:00 -0000 Subject: RE: .gnu.linkonce.? and .gcc_except_table Message-ID: <204DEA5423F3BF47A6EE88C4E2979EC66BE84EDABD@nambx04.corp.adobe.com> References: <22691863.post@talk.nabble.com> <22692103.post@talk.nabble.com> <22728191.post@talk.nabble.com> ,<22755182.post@talk.nabble.com> In-Reply-To: <22755182.post@talk.nabble.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2009-03/txt/msg00375.txt.bz2 Hi John, The linkonce is to support C++ vague linkage. It is related to C++'s ODR, = and can cause surprises if ODR is violated. > Is there an example, perhaps, that will cause this illusive link once sec= tion to appear in an object file? If you compile with RTTI turned on, you'll see linkonce sections for all th= e RTTI of all the classes in the translation unit of that object file. If you keep generated functions for inline functions (-fkeep-inline-functio= ns), I presume you'll see linkonce sections for all the emitted kept inline= functions. (Since, typically, inline functions are in header files, this would be a vi= olation of the principle that header files do not emit code (.text) or data= (.data, .bss) into object files. RTTI information emitted is fuzzy, and d= oesn't count against the principle.) > Do they actually appear in C programs? I am not aware of C programs using linkonce, since it's for linker support = for C++ vague linkage semantics. Perhaps used for C static inline functions in header files. (C99) HTH, --Eljay