public inbox for ecos-patches@sourceware.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugs.ecos.sourceware.org
To: ecos-patches@ecos.sourceware.org
Subject: [Bug 1001142] User defined linker sections.
Date: Mon, 14 Feb 2011 21:06:00 -0000	[thread overview]
Message-ID: <20110214210605.98F642F78001@mail.ecoscentric.com> (raw)
In-Reply-To: <bug-1001142-104@http.bugs.ecos.sourceware.org/>

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001142

--- Comment #16 from Ilija Kocho <ilijak@siva.com.mk> 2011-02-14 21:06:02 GMT ---
Created an attachment (id=1127)
 --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1127)
CYG_USER_SECTION_XXX() macro use/test case.

(In reply to comment #15)
> (In reply to comment #11)

Sergei, This looks like solution as a solution for provision of section name
from CDL, but in cortexm.ld/USER_SECTION() we still need concatenation in order
to get __foo_start and __foo_end . Same is for user application should it need
to perform some operation on section. Please look at attached use/test case.

About the attached use/test case:

Due to prescan we need proxies. In the submitted example I am using John's
names CYG_USER_SECTION_XXX() for proxies since they are supposed to appear in
user code. Concatenation macros are named __CYG_USER_SECTION_XXX() respectively
and they are also used by USER_SECTION() (see NOTE below.)

The example includes both correct and wrong code (with respect to prescan)
selectable by TRY_RIGHT switch.
This example should be combined with cortexm_ld_1.diff, the patch that I am
posting in following attachment.

NOTE: __CYG_USER_SECTION_XXX() macros, for this example also appear (as a
copypaste) in cortexm.ld since I couldn't locate a suitable header.



> > 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.
> 
> Maybe "complexity" starts in the target's config, as that CDL booldata
> (for the section's name) was set as a string
> 
>      default_value { "foo" }
> 
> In fact then in the most we need to manage the labels and addresses
> (!strings). If we avoid the first stringification, i.e. define in CDL
> 
>      default_value foo
> 
> then we will have destringified things in pkgconf/* like
> 
> #define CYGHWR_~~~_FOO foo
> #define CYGHWR_~~~_FOO_foo
> 
> And CYGHWR_~~~_...FOO is ready to use in .ld, .ldi, .h files, is it
> not? Well, I call the LWIP's MEM_SECTION macro. If it make life easier,
> I would prefer to add 1 "extra" line in lwipopts.h
> 
> #define STRINGIFY(x) #x
> #define MEM_SECTION CYGBLD_ATTRIB_SECTION(STRINFIFY(CYGHWR_~~~_xxxFOO))
> 
> It seems to me this would let us do not use complex de-stringify macros in
> arch. ld script.

-- 
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.

  parent reply	other threads:[~2011-02-14 21:06 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-03 15:43 [Bug 1001142] New: " bugzilla-daemon
2011-02-03 17:02 ` [Bug 1001142] " bugzilla-daemon
2011-02-13 17:40 ` bugzilla-daemon
2011-02-13 18:47 ` bugzilla-daemon
2011-02-13 19:02 ` bugzilla-daemon
2011-02-13 19:50 ` bugzilla-daemon
2011-02-13 20:02 ` bugzilla-daemon
2011-02-14  7:28 ` bugzilla-daemon
2011-02-14  8:36 ` bugzilla-daemon
2011-02-14  9:17 ` bugzilla-daemon
2011-02-14 12:34 ` bugzilla-daemon
2011-02-14 12:44 ` bugzilla-daemon
2011-02-14 13:03 ` bugzilla-daemon
2011-02-14 13:16 ` bugzilla-daemon
2011-02-14 13:43 ` bugzilla-daemon
2011-02-14 15:52 ` bugzilla-daemon
2011-02-14 18:34 ` bugzilla-daemon
2011-02-14 21:06 ` bugzilla-daemon [this message]
2011-02-14 21:20 ` bugzilla-daemon
2011-02-14 22:02 ` bugzilla-daemon
2011-02-14 22:42 ` bugzilla-daemon
2011-02-15  9:51 ` bugzilla-daemon
2011-02-15 12:28 ` bugzilla-daemon
2011-02-15 15:00 ` bugzilla-daemon
2011-02-15 21:00 ` bugzilla-daemon
2011-02-15 22:38 ` bugzilla-daemon
2011-02-16  9:50 ` bugzilla-daemon
2011-02-16 10:11 ` bugzilla-daemon
2011-02-16 12:00 ` bugzilla-daemon
2011-02-16 12:15 ` bugzilla-daemon
2011-02-17  0:09 ` bugzilla-daemon
2011-02-17 14:19 ` bugzilla-daemon
2011-02-17 14:50 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110214210605.98F642F78001@mail.ecoscentric.com \
    --to=bugzilla-daemon@bugs.ecos.sourceware.org \
    --cc=ecos-patches@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).