Skip to content

Conversation

@sonals
Copy link
Contributor

@sonals sonals commented Nov 11, 2025

  1. Update elfio so it does not load the segment data in segment::load_data() if the segment data is already stored in matching sections. This prevents memory duplication which otherwise leads to very large memory usage for ELF with large text/data.
  2. To support the current segment::get_data() usage, the segment loads the data from the matched sections on demand. Note that users of this API will not see any overall reduction in memory usage. Users are encouraged to get the data directly from sections to avoid data duplication.

… now if a client requests segment data via get_data(), ELFIO creates a copy of data by reading over data stored in the matching segments.

Signed-off-by: Sonal Santan <sonal.santan@amd.com>
…ading. This allows matching of sections to segments and skip loading of segment data if the data is already present in matched sections

Signed-off-by: Sonal Santan <sonal.santan@amd.com>
Signed-off-by: Sonal Santan <sonal.santan@amd.com>
@sonals
Copy link
Contributor Author

sonals commented Nov 20, 2025

@serge1, gentle reminder to review PR #163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant