Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elf2cfetbl Integration candidate: Caelum+dev1 #98

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ See README.txt for more information.

## Version History

### Development Build: v3.3.0-rc4+dev4

- Fix Untrusted divisor (TAINTED_SCALAR) static analysis warning by checking `get_sh_entsize(SectionHeader)`
- Set baseline for cFS-Caelum-rc4: v3.3.0-rc4
- Update mission rev to use 0xFF for development version
- See <https://github.com/nasa/elf2cfetbl/pull/98> and <https://github.com/nasa/cfs/pull/390>

### Development Build: v3.2.0-rc1+dev30

- Implement Coding Standard in CodeQL workflow
Expand Down
9 changes: 8 additions & 1 deletion elf2cfetbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1774,7 +1774,14 @@ int32 GetSectionHeader(int32 SectionIndex, union Elf_Shdr *SectionHeader)
SymbolTableDataOffset = SectionHeader->Shdr64.sh_offset + sizeof(Elf64_Sym);
}
SymbolTableEntrySize = get_sh_entsize(SectionHeader);
NumSymbols = (get_sh_size(SectionHeader) / get_sh_entsize(SectionHeader)) - 1;
if (SymbolTableEntrySize == 0)
{
NumSymbols = 0;
}
else
{
NumSymbols = (get_sh_size(SectionHeader) / SymbolTableEntrySize) - 1;
}
sprintf(VerboseStr, "SHT_SYMTAB (2) - # Symbols = %lu", (long unsigned int)NumSymbols);
break;

Expand Down
21 changes: 14 additions & 7 deletions elf2cfetbl_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,24 @@
/*
* Development Build Macro Definitions
*/
#define ELF2CFETBL_BUILD_NUMBER 30 /*!< @brief Number of commits since baseline */
#define ELF2CFETBL_BUILD_NUMBER 4 /*!< @brief Number of commits since baseline */
#define ELF2CFETBL_BUILD_BASELINE \
"v3.2.0-rc1" /*!< @brief Development Build: git tag that is the base for the current */
"v3.3.0-rc4" /*!< @brief Development Build: git tag that is the base for the current */

/*
* Version Macro Definitions
*/
#define ELF2CFETBL_MAJOR_VERSION 3 /*!< @brief ONLY APPLY for OFFICIAL releases. Major version number. */
#define ELF2CFETBL_MINOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Minor version number. */
#define ELF2CFETBL_REVISION 0 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. */
#define ELF2CFETBL_MISSION_REV 0 /*!< @brief ONLY USED by MISSION Implementations. Mission revision */

/*!
* @brief Mission revision.
*
* Set to 0 on OFFICIAL releases, and set to 255 (0xFF) on development versions.
* Values 1-254 are reserved for mission use to denote patches/customizations as needed.
*/
#define ELF2CFETBL_MISSION_REV 0xFF

/*
* Tools to construct version string
Expand All @@ -59,9 +66,9 @@
* @details Reports the current development build's baseline, number, and name. Also includes a note about the latest
* official version. @n See @ref cfsversions for format differences between development and release versions.
*/
#define ELF2CFETBL_VERSION_STRING \
" elf2cfetbl Development Build\n" \
" " ELF2CFETBL_VERSION " (Codename: Bootes)\n" /* Codename for current development */ \
" Last Official Release: elf2cfetbl v3.1.0" /* For full support please use official release version */
#define ELF2CFETBL_VERSION_STRING \
" elf2cfetbl Development Build\n" \
" " ELF2CFETBL_VERSION " (Codename: Draco)\n" /* Codename for current development */ \
" Last Official Release: elf2cfetbl v3.1.0" /* For full support please use official release version */

#endif /* ELF2CFETBL_VERSION_H */