commit | 5019caaea11ecfd4e32cd09b7b7c59bf9b675698 | [log] [tgz] |
---|---|---|
author | Sam Leffler <sleffler@google.com> | Wed Dec 04 14:16:55 2024 -0800 |
committer | Sam Leffler <sleffler@google.com> | Mon Dec 09 10:09:26 2024 -0800 |
tree | 40cc5983128f415529fa477fc561a54095069ea1 | |
parent | b19fe0220af3411a4eff9bb0693d7f42c714acc7 [diff] |
elfloader: band-aid handling of PHDRs that span flash pages - inspect the PHDR p_type field without copying the entire header when checking if a PHDR is loadable (we assume the PHDR is word-aligned which is probably ok) - advance to a new flash page--as needed--when reading a PHDR - add an assert with an informative message when checking for a PHDR that spans flash pages; previously this would trigger an obscure assert when constructing the slice of raw bytes - add Elf32Phdr::get_type() to return just the p_type field of a PHDR - change Elf32Phdr::from_bytes() to take an immutable ref This hacks around problems where the latest CHERIoT lld appends PHDRs that require multiple flash pages but are not loaded. A better fix would assemble PHDR's that span flash pages. Change-Id: I1cfdc93ecb79fa7008bdfcab8a9210fbaaf89baf
This project contains the support needed to build a TockOS artifact that can run on the Matcha security core, and integrated as part of the Shodan repository.
If you get this project from Project Shodan manifest, you are all set.
This project needs to be at <dir>/sw/matcha
.