Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to remove sections and/or segments? #147

Open
dsw opened this issue Jan 21, 2025 · 0 comments
Open

how to remove sections and/or segments? #147

dsw opened this issue Jan 21, 2025 · 0 comments

Comments

@dsw
Copy link

dsw commented Jan 21, 2025

I am modifying ELF files and as part of that process I want to delete existing segments / sections. There does not seem to be any method to do this. What do you recommend?

While both the sections and the segments seem to just vectors, I am never quite sure of how the data-structures might depend on one another, so I wasn't sure that just deleting from the vectors would do it cleanly. Further, these vectors are private within class elfio, so I would have to hack the class.

I suppose I could make a new ELF and copy the parts of the old one that I want. If I do so, is there a straightforward way to clone all of the relevant headers of various kinds without missing any?

It would make a great example to show cloning an ELF and then checking a predicate for each section and segment to know whether a given section/segment should be copied to the new ELF.

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

No branches or pull requests

1 participant