This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug 1001142] User defined linker sections.


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

--- Comment #15 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-02-14 18:34:18 GMT ---
(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.

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]