From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6876 invoked by alias); 15 Feb 2011 09:51:01 -0000 Received: (qmail 6840 invoked by uid 22791); 15 Feb 2011 09:50:59 -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; Tue, 15 Feb 2011 09:50:53 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 73E482FB0003 for ; Tue, 15 Feb 2011 09:50:50 +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 VlwdMg4IVBUp; Tue, 15 Feb 2011 09:50:49 +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: Tue, 15 Feb 2011 09:51:00 -0000 Message-Id: <20110215095049.0FABE2F78003@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/msg00052.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 #20 from Ilija Kocho 2011-02-15 09:50:42 GMT --- (In reply to comment #18) > (In reply to comment #16 and comment #17) > > Ilija, thank you for clarifications and snippets. I get it. However I > would rename the undescored macros (__CYG_USER_SECTION_*), e.g. > > #define CYG_LINK_SECTION_START(_name_) __ ## _name_ ## _start > #define CYG_LINK_SECTION_END(_name_) __ ## _name_ ## _end > > Variants of prefixes to discuss CYG_LINK, CYG_LOAD, and CYG_LD. That > will mean, - Use them in a linker scripts. > > #define CYG_USER_SECTION_START(_name_) CYG_LINK_SECTION_START(_name_) > #define CYG_USER_SECTION_END(_name_) CYG_LINK_SECTION_END(_name_) > > The USER means, - Use in a userspace code. I'm not quite convinced about this notation, I consider USER_SECTION a stem for all related macro names. I decided to prefix concatenation with __ because they are supposed to be kind of "hidden", but it may be just my view. However if some of "linker" variants is opted I would prefer LD as this acronym is associated with linker staff through the code (target.ld, mlt*.ldi, etc). > > About duplication the declarations. As target.ld scripts ends with > > #include > #include CYGHWR_MEMORY_LAYOUT_LDI > > We would declare USER_SECTION after that inclusion the arch's header > and that can be a place for standalone declaration: > > #include > #if defined(CYG_LINK_SECTION_START) && defined(CYG_LINK_SECTION_END) > #define USER_SECTION(_name_, _region_, _vma_, _lma_) \ > ._name_ _vma_ : _lma_ \ > { CYG_LINK_SECTION_START(_name_) = ABSOLUTE (.); \ > *(._name_*) \ > CYG_LINK_SECTION_END(_name_) = ABSOLUTE (.); } \ > > _region_ > #endif > > #include CYGHWR_MEMORY_LAYOUT_LDI > > So, the place to define CYG_{USER,LINK} macros would be hal_cortexm.h. > I hope that I did not "break" something again :-) I'm not sure if it is proper to place such stuff in a file generated from CDL. -- 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.