Add what to verify section#85
Merged
DeanoBurrito merged 13 commits intomasterfrom Mar 25, 2024
Merged
Conversation
DeanoBurrito
requested changes
Mar 7, 2024
|
|
||
| * The first thing we want to check is the Magic number, this is the `ELFMAG` part. It is expected to be the following values: `0x7f, 'E', 'L', 'F'`. Bytes 0 to 3. | ||
| * We need to check that the file class match with the one we are supporting. There are two possible classes: 64 and 32. Thi is byte 4 | ||
| * The data field indicates the bit numbering convetion, again this depends on the architecture used. It can be three values: None (0), LSB (1) and MSB (2). For example x86_64 architecture value is 1. This field is in the byte 5. |
Member
There was a problem hiding this comment.
bit numbering convention is usually referred to as endianness (which end of the number comes first). X86_64 is little endian, so we want LSB (1).
| * The version field, byte 6, to be a valid elf it has to be set to 1 (EVCURRENT). | ||
| * The OS Abi and Abi version they identify the operating system together with the ABI to which the object is targeted and the version of the ABI to which the object is targeted, for now we can ignore them, the should be 0. | ||
|
|
||
| Then from the other fields that needs validation (that area not in the `e_ident` field) are: |
| * The version field, byte 6, to be a valid elf it has to be set to 1 (EVCURRENT). | ||
| * The OS Abi and Abi version they identify the operating system together with the ABI to which the object is targeted and the version of the ABI to which the object is targeted, for now we can ignore them, the should be 0. | ||
|
|
||
| Then from the other fields that needs validation (that area not in the `e_ident` field) are: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.