From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7954 invoked by alias); 14 Feb 2011 15:52:11 -0000 Received: (qmail 7904 invoked by uid 22791); 14 Feb 2011 15:52:08 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Feb 2011 15:52:02 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 9CE0C2F80005 for ; Mon, 14 Feb 2011 15:51:59 +0000 (GMT) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9rDPSzVA97Of; Mon, 14 Feb 2011 15:51:55 +0000 (GMT) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-patches@ecos.sourceware.org Subject: [Bug 1001142] User defined linker sections. X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: Patches and contributions X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ilijak@siva.com.mk X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Mon, 14 Feb 2011 15:52:00 -0000 Message-Id: <20110214155155.4DFDB2F78001@mail.ecoscentric.com> Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2011-02/txt/msg00046.txt.bz2 Please do not reply to this email. Use the web interface provided at: http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001142 --- Comment #14 from Ilija Kocho 2011-02-14 15:51:53 GMT --- (In reply to comment #13) > (In reply to comment #12) > > (In reply to comment #11) > > > > > I introduced them because of properties of CPP concatenation ## with respect to > > > argument prescan. > > > http://gcc.gnu.org/onlinedocs/cpp/Argument-Prescan.html#Argument-Prescan > > > They are needed if "_name_" is a macro: > > > > > > #define FOO "foo" > > > USER_SECTION(FOO, reg, vma, lma) > > > > > > Example use case is when the section name is provided via CDL. > > > I would keep them but we may consider more suitable names. > > > > Ilija, thank you for the clarification. I now agree that we should keep them. > > Perhaps they could be renamed to CYG_USER_SECTION_START() and > > CYG_USER_SECTION_END() to reduce the possibility of a naming clash? > > John, I take that you are more qualified than me for avoidance of naming clash > so I would accept your choice. > > Just one note: The products of these macros can also be useful for application > (zeroing the section or so). Is it possible (and desirable) to place them > somewhere else where they will be available to both cortexm.ld and user? I owe you some further explanation. If used from application, CYG_USER_SECTION_START() and CYG_USER_SECTION_END() shall be subject to argument prescan too, so they can't be called directly if _name_ is a macro. Their usage should be through a proxy, something like: #define APP_USER_SECTION_START(_name_) CYG_USER_SECTION_START(_name_) then #define FOO foo APP_USER_SECTION_START(FOO) should expand to __foo_start Is this becoming too complex? I am going to make some use case and put it to test. -- Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.