Remove static
designation from CFE_TBL_FileDef objects
#66
Labels
Milestone
static
designation from CFE_TBL_FileDef objects
#66
Checklist (Please check before submitting)
Is your feature request related to a problem? Please describe.
Having a global declared as
static
is supposed to be for cases where the symbol is not to be referenced outside of that compilation unit (that is, it makes the symbol "hidden", so to speak). It prevents other compilation units being linked with this unit from seeing the symbol.Somewhere along the way, this keyword got applied to table definitions in many CFS apps. This is not required and even a bad idea for several reasons:
elf2cfetbl
tool does need to find the symbol. (Thus if it is truly "hidden" it will not work - this seems to rely on the name still appearing in the ELF but simply as a different type of symbol)__attribute__((__used__))
was added. Attributes like this are a non-standardized extension, and these are not supposed to be used in FSW code.Describe the solution you'd like
Just make it a regular (non-static) symbol with no special attributes - everything "just works" this way.
Additional context
See
FM/fsw/tables/fm_monitor.c
Lines 41 to 42 in c4063cc
Requester Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: