Add a tool to embed a checksum to check the integrity of the ELF file.
Legally significant software requires each sub-module to have a checksum that can be used to verify the integrity of the module as a whole based on a hash of the sum of individual checksums from the sub-modules that make up the software subject to legalization.
CRC hash will be embeded into ELF header onto unused padding bytes (10:16) which are ignored by ELF loaders and parsers, normally this fields should be set to zero (default value). CRC32 hash is calculated ignoring those bytes (assuming normally always zero) during checksum calculation and checksum verification. Integrity of ELF file can be easily verified thanks to known ELF file size (as read from standard ELF header) and embedded by this tool checksum (CCITT-32, polynomial: EDB88320).
JIRA: RTOS-295
Description
Motivation and Context
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
How Has This Been Tested?
[ ] Already covered by automatic testing.
[ ] New test added: (add PR link here).
[x] Tested by hand on: (host machine).
Checklist:
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have added tests to cover my changes.
[ ] All new and existing linter checks and tests passed.
[ ] My changes generate no new compilation warnings for any of the targets.
Special treatment
[ ] This PR needs additional PRs to work (list the PRs, preferably in merge-order).
[ ] I will merge this PR by myself when appropriate.
Add a tool to embed a checksum to check the integrity of the ELF file.
Legally significant software requires each sub-module to have a checksum that can be used to verify the integrity of the module as a whole based on a hash of the sum of individual checksums from the sub-modules that make up the software subject to legalization.
CRC hash will be embeded into ELF header onto unused padding bytes (10:16) which are ignored by ELF loaders and parsers, normally this fields should be set to zero (default value). CRC32 hash is calculated ignoring those bytes (assuming normally always zero) during checksum calculation and checksum verification. Integrity of ELF file can be easily verified thanks to known ELF file size (as read from standard ELF header) and embedded by this tool checksum (CCITT-32, polynomial: EDB88320).
JIRA: RTOS-295
Description
Motivation and Context
Types of changes
How Has This Been Tested?
Checklist:
Special treatment