This is the mail archive of the ecos-bugs@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 #9 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-02-14 12:34:01 GMT ---
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
[snip]
> > > I do agree that the name "SECTION_user()" could lead to some confusion
> > > with the existing SECTION_*() macros which have a different number of
> > > parameters.  I would be happy to use a macro name such as
> > > "USER_SECTION()" instead.
> > 
> > John, then I "found" such a name too :-), and I like this name and now I
> > would argee with your points about macro placement (cortexm.ld).
> 
> Me too, do you need me to produce a new patch?

So, we are happy with USER_SECTION(). What's about those SECTION_START,
SECTION_END definitions in the Attachment 1116 ?  Will be they ever
used then? IMO, the names are too generic and seem like the "reserved"
words ...

If you need those defs, what is about USER_LABEL() instead?

#define USER_LABEL(_label_) \
    ...

If we do not need those defs at all, I would be happy with (not tested)

--- a/packages/hal/cortexm/arch/current/src/cortexm.ld
+++ b/packages/hal/cortexm/arch/current/src/cortexm.ld
@@ -268,5 +268,11 @@ OUTPUT_FORMAT(elf32-bigarm)

 #define SECTIONS_END . = ALIGN(4); _end = .; PROVIDE (end = .);

+#define USER_SECTION(_name_, _region_, _vma_, _lma_) \
+    . ## _name_ _vma_ : _lma_ \
+    { __ ## _name_ ## _start = ABSOLUTE (.); \
+    *(. ## _name_)* \
+    __ ## _name_ ## _end = ABSOLUTE (.); }
+
 #include <pkgconf/hal_cortexm.h>
 #include CYGHWR_MEMORY_LAYOUT_LDI

Comments?

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


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