makeelf
makeelf copied to clipboard
Truncated section contents when array of objects instead of usual bytes object
When adding a section it is possible to add array of makeelf objects as contents. The requirement is to just have len(),bytes(),.from_bytes() implemented. It is particularly useful when handling dynamic or symbol tables.
In such a case, during serialization, the contents of a section is truncated to the number of bytes matching the length of an array.