Skip to content

Fix R_X86_64_GOTPC32_TLSDESC relaxations#1051

Merged
marxin merged 2 commits into
wild-linker:mainfrom
marxin:fix-R_X86_64_GOTPC32_TLSDESC-relaxations
Aug 15, 2025
Merged

Fix R_X86_64_GOTPC32_TLSDESC relaxations#1051
marxin merged 2 commits into
wild-linker:mainfrom
marxin:fix-R_X86_64_GOTPC32_TLSDESC-relaxations

Conversation

@marxin

@marxin marxin commented Aug 15, 2025

Copy link
Copy Markdown
Collaborator

Properly detect the destination register and encode the information into the mov replacement instruction.

Both variants are tested for %rax in our test-suite (one via a Mold test). @mati865 can you please test the suggested fix?

Fixes: #948

Properly detect the destination register and encode the information into the `mov` replacement instruction.

@mati865 mati865 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, I have checked mesa package on Arch Linux and it works fine.
It only tests LocalExec variant though.

Comment thread linker-utils/src/x86_64.rs Outdated
@marxin marxin merged commit e889fb9 into wild-linker:main Aug 15, 2025
23 checks passed
@marxin marxin deleted the fix-R_X86_64_GOTPC32_TLSDESC-relaxations branch August 15, 2025 15:13
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.

Wrong R_X86_64_GOTPC32_TLSDESC relaxation

3 participants