Skip to content

Do not duplicate relocation data#95

Open
pekangas wants to merge 1 commit into
tock:masterfrom
pekangas:relocs
Open

Do not duplicate relocation data#95
pekangas wants to merge 1 commit into
tock:masterfrom
pekangas:relocs

Conversation

@pekangas

Copy link
Copy Markdown

Skip relocation data while processing segments since it will be added separately at the end of the file. Note that this logic skips entire segments if they contain nothing but relocation data so may break if a segment contains both relocations an other sections (but is that possible?)

Also handle .rela relocation sections

This fixes #94 at least for our use cases..

Skip relocation data while processing segments since it will be added
separately at the end of the file. Note that this logic skips entire
segments if they contain nothing but relocation data so may break if a
segment contains both relocations an other sections (but is that
possible?)

Also handle .rela relocation sections
Comment thread src/convert.rs
if reloc_only {
if verbose {
println!(" Skipping segment since it only contains relocs");
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just put a continue here (consistent with the checks above around line 629?

Comment thread src/convert.rs
println!(" Skipping segment since it only contains relocs");
}
} else {
// Handle padding now that we know we want something from this

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just move the entire padding check from above here? I'd like to keep the utility of the option of last_segment_address_end and not have padding == 0 mean both no padding and there can't be padding because this is the first segment.

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.

Relocation data gets duplicated in the resulting TBF file

2 participants