This is the mail archive of the
ecos-bugs@sourceware.org
mailing list for the eCos project.
[Bug 1001142] User defined linker sections.
- From: bugzilla-daemon at bugs dot ecos dot sourceware dot org
- To: unassigned at bugs dot ecos dot sourceware dot org
- Date: Mon, 14 Feb 2011 22:02:20 +0000
- Subject: [Bug 1001142] User defined linker sections.
- Auto-submitted: auto-generated
- References: <bug-1001142-777@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 #18 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-02-14 22:02:17 GMT ---
(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.
About duplication the declarations. As target.ld scripts ends with
#include <pkgconf/hal_arch.h>
#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 <pkgconf/hal_arch.h>
#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 :-)
--
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.