tock / tock/elf2tab

Relocation data gets duplicated in the resulting TBF file

Open
#94 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
18
Forks
42
PR merge metrics
No merged PRs in 30d

Description

The last of the issues we found while catching up with top-of-tree elf2tab...

The logic that gathers relocation data and places it at the end of the file ends up also emitting the data in place, which results in relocations being in the file twice.

My fix is a bit ugly, basically skipping segments that only have relocation data in them. I believe it should generally work, unless some configurations end up combining relocations with other data in the same segment?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace the logic that gathers relocation data and places it at the end of the TBF file, then reproduce the issue with an ELF containing relocations. Check how segments containing only relocation data are handled, including configurations that combine relocations with other data; done means each relocation is emitted exactly once.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.