x86_64 backend does not support multiple TLS segments
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 259
- Forks
- 84
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 72
Description
The x86_64 backend currently only supports a single TLS segment. When multiple TLS segments are encountered during linking, the linker fails with an assertion error.
The current implementation in x86_64Relocator::computeTLSOffsets() assumes exactly one TLS segment and calculates TLS template size based on this assumption.
ASSERT(tlsSegments.size() == 1,
"Multiple TLS segments not supported in x86_64 backend");
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating x86_64Relocator::computeTLSOffsets() and inspect how it assumes one TLS segment. Reproduce a link involving multiple TLS segments and trace the assertion failure. Done means the x86_64 backend links multiple TLS segments without the assertion and calculates the TLS template size correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100