Eliminate GEN_OFFSET_SYM_HOST() macro
Gets rid of code that creates absolute symbols for data structures that are no longer referenced by external tools, as well as the macro that was used to generate them. The code that creates absolute symbols for context monitoring-related symbols is retained, but is now directly tied to the CONTEXT_MONITORING configuration option upon which those symbols depend. Change-Id: I6b2ce46d9ab9592a478f591cb074c4c163e9ba0f Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This commit is contained in:
parent
b32f81dbe4
commit
e4b70a95fb
3 changed files with 20 additions and 45 deletions
|
|
@ -122,31 +122,6 @@ GEN_OFFSET_SYM(NANO_ESF, eflags);
|
|||
GEN_OFFSET_SYM(NANO_ESF, esp);
|
||||
GEN_OFFSET_SYM(NANO_ESF, ss);
|
||||
|
||||
/* NANO_ISF structure member offsets for host tools */
|
||||
|
||||
GEN_OFFSET_SYM_HOST(NANO_ISF, edx);
|
||||
GEN_OFFSET_SYM_HOST(NANO_ISF, ecx);
|
||||
GEN_OFFSET_SYM_HOST(NANO_ISF, eax);
|
||||
GEN_OFFSET_SYM_HOST(NANO_ISF, eip);
|
||||
GEN_OFFSET_SYM_HOST(NANO_ISF, cs);
|
||||
GEN_OFFSET_SYM_HOST(NANO_ISF, eflags);
|
||||
GEN_OFFSET_SYM_HOST(NANO_ISF, esp);
|
||||
GEN_OFFSET_SYM_HOST(NANO_ISF, ss);
|
||||
|
||||
/* NANO_SSF structure member offsets for host tools */
|
||||
|
||||
#ifdef CONFIG_GDB_INFO
|
||||
GEN_OFFSET_SYM_HOST(NANO_SSF, ebp);
|
||||
GEN_OFFSET_SYM_HOST(NANO_SSF, ebx);
|
||||
GEN_OFFSET_SYM_HOST(NANO_SSF, esi);
|
||||
GEN_OFFSET_SYM_HOST(NANO_SSF, edi);
|
||||
#endif /* CONFIG_GDB_INFO */
|
||||
GEN_OFFSET_SYM_HOST(NANO_SSF, eip);
|
||||
GEN_OFFSET_SYM_HOST(NANO_SSF, cs);
|
||||
GEN_OFFSET_SYM_HOST(NANO_SSF, eflags);
|
||||
GEN_OFFSET_SYM_HOST(NANO_SSF, esp);
|
||||
GEN_OFFSET_SYM_HOST(NANO_SSF, ss);
|
||||
|
||||
/* tTaskStateSegment structure member offsets */
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,16 @@ various nanokernel structures. These absolute symbols are typically
|
|||
utilized by assembly source files rather than hardcoding the values in
|
||||
some local header file.
|
||||
|
||||
WARNING: Absolute symbols can potentially be utilized by external tools --
|
||||
for example, to locate a specific field within a data structure. Consequently,
|
||||
changes made to such symbols may require modifications to the associated
|
||||
tool(s). Typically, relocating a member of a structure merely requires
|
||||
that a tool be rebuilt; however, moving a member to another structure
|
||||
(or to a new sub-structure within an existing structure) may require that
|
||||
the tool itself be modified. Likewise, deleting, renaming, or changing the
|
||||
meaning of an absolute symbol may require modifications to a tool.
|
||||
|
||||
|
||||
The macro "GEN_OFFSET_SYM(structure, member)" is used to generate a single
|
||||
absolute symbol. The absolute symbol will appear in the object module
|
||||
generated from the source file that utilizes the GEN_OFFSET_SYM() macro.
|
||||
|
|
@ -46,6 +56,7 @@ form:
|
|||
|
||||
__<structure>_<member>_OFFSET
|
||||
|
||||
|
||||
This header also defines the GEN_ABSOLUTE_SYM macro to simply define an
|
||||
absolute symbol, irrespective of whether the value represents a structure
|
||||
or offset.
|
||||
|
|
@ -124,22 +135,4 @@ $ nm offsets.o
|
|||
#define GEN_OFFSET_SYM(S, M) \
|
||||
GEN_ABSOLUTE_SYM(__##S##_##M##_##OFFSET, offsetof(S, M))
|
||||
|
||||
/*
|
||||
* Macro used to generate an absolute symbol utilized by host-side tools.
|
||||
*
|
||||
* IMPORTANT: Changes to such symbols MUST be coordinated with the host-side
|
||||
* tool that uses each symbol. Do NOT delete or change the meaning
|
||||
* of structure members used by host-side tools without proper consultation.
|
||||
* Relocating a member within a structure can be done freely, as long as it
|
||||
* only changes the offset of the member; however, relocating a member used
|
||||
* by host-side tools to another structure (including a new sub-structure
|
||||
* within an existing structure) requires consultation.
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_CONTEXT_MONITOR)
|
||||
#define GEN_OFFSET_SYM_HOST(s, m) GEN_OFFSET_SYM(s, m)
|
||||
#else
|
||||
#define GEN_OFFSET_SYM_HOST(s, m)
|
||||
#endif /* CONFIG_CONTEXT_MONITOR */
|
||||
|
||||
#endif /* _GEN_OFFSET_H */
|
||||
|
|
|
|||
|
|
@ -45,7 +45,10 @@ GEN_ABS_SYM_BEGIN(_OffsetAbsSyms)
|
|||
GEN_OFFSET_SYM(tNANO, fiber);
|
||||
GEN_OFFSET_SYM(tNANO, task);
|
||||
GEN_OFFSET_SYM(tNANO, current);
|
||||
GEN_OFFSET_SYM_HOST(tNANO, contexts);
|
||||
|
||||
#if defined(CONFIG_CONTEXT_MONITOR)
|
||||
GEN_OFFSET_SYM(tNANO, contexts);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FP_SHARING
|
||||
GEN_OFFSET_SYM(tNANO, current_fp);
|
||||
|
|
@ -58,12 +61,16 @@ GEN_ABSOLUTE_SYM(__tNANO_SIZEOF, sizeof(tNANO));
|
|||
/* arch-agnostic tCCS structure member offsets */
|
||||
|
||||
GEN_OFFSET_SYM(tCCS, link);
|
||||
GEN_OFFSET_SYM_HOST(tCCS, next_context);
|
||||
GEN_OFFSET_SYM(tCCS, prio);
|
||||
GEN_OFFSET_SYM(tCCS, flags);
|
||||
GEN_OFFSET_SYM(tCCS, coopReg); /* start of coop register set */
|
||||
GEN_OFFSET_SYM(tCCS, preempReg); /* start of prempt register set */
|
||||
|
||||
#if defined(CONFIG_CONTEXT_MONITOR)
|
||||
GEN_OFFSET_SYM(tCCS, next_context);
|
||||
#endif
|
||||
|
||||
|
||||
/* size of the entire tCCS structure */
|
||||
|
||||
GEN_ABSOLUTE_SYM(__tCCS_SIZEOF, sizeof(tCCS));
|
||||
|
|
|
|||
Loading…
Reference in a new issue