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

Loaded, modified, saved elf file is more different than expected from original #63

Closed
sktpin opened this issue Jan 14, 2021 · 1 comment

Comments

@sktpin
Copy link

sktpin commented Jan 14, 2021

Hello, I'm don't know a lot of details about the .elf format, so maybe there can be a good reason for it.

I have a bare metal project for ARM Cortex M, using the ARM GCC compiler toolchain for that.
So I use ELFIO load a produced .elf file, search for one section by name, call set_data() on that section to change the content (size should remain the same), and call .save() on that elfio object.
The changed section is only a few uint32's big.

Looking at the resulting file in the hex editor, I find things like big blocks (kilobytes maybe) of zeroes where the original file had data.
Also, the saved file is now 6KB bigger than the original one.

Can there be legitimate reasons for these observations, or is something wrong? (I've not tried using it yet)

@serge1
Copy link
Owner

serge1 commented Jan 15, 2021

Duplicate of #62

@serge1 serge1 marked this as a duplicate of #62 Jan 15, 2021
@serge1 serge1 closed this as completed Jan 15, 2021
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

2 participants