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

Use reserved space footer for padding #84

Merged
merged 1 commit into from
May 15, 2024
Merged

Conversation

bradjc
Copy link
Contributor

@bradjc bradjc commented May 7, 2024

elf2tab supports two types of padding at the end of a TBF file: 1) creating a reserved space TBF footer or 2) just adding bytes to the binary. The need to support both is because a reserved space footer can only pad 8 or more bytes.

This patch fixes an issue where the padding needed is less than 8, but, there is already going to be a reserved footer. In that case, we were adding the padding twice (once in the reserved footer and again as just extra bytes).

This issue only arises if you ask for a certain amount of footer space when running elf2tab.

elf2tab supports two types of padding: 1) creating a reserved space
footer or 2) just adding bytes to the binary. The need to do both is
because a reserved space footer can only pad 8 or more bytes.

This patch fixes an issue where the padding needed is less than 8, but,
there is already going to be a reserved footer. In that case, we were
adding the padding twice (once in the reserved footer and again as just
extra bytes).

This issue only arises if you ask for a certain amount of footer space
when running elf2tab.
@ppannuto ppannuto merged commit 48de07c into master May 15, 2024
3 checks passed
@bradjc bradjc deleted the reserved-space-padding branch June 20, 2024 12:39
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.

3 participants