Skip to content

[lld][LoongArch] Support relaxation during TLSDESC GD/LD to IE/LE conversion #123730

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

Open
wants to merge 37 commits into
base: users/ylzsx/r-tlsdesc-to-iele-norelax
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
ea9fea2
Relax PCHi20Lo12.
ylzsx Dec 27, 2024
95f4540
la.pcrel relax test modify.
ylzsx Dec 24, 2024
7b133c2
Add test for PCHi20Lo12
ylzsx Dec 27, 2024
abc1a45
Add test for got symbols relaxation.
ylzsx Dec 30, 2024
1b1804e
Modify test. NFC
ylzsx Jan 15, 2025
30cb382
Add check for register.
ylzsx Jan 20, 2025
f1f995b
Relax call36/tail36.
ylzsx Dec 26, 2024
f227ae5
modify test for call36/tail36.
ylzsx Dec 27, 2024
f2aae15
Modify test. Add the option --relax.
ylzsx Jan 16, 2025
7993434
Relax TLS LE/GD/LD.
ylzsx Dec 27, 2024
1e9aa52
Add test for TLSLD/TLSGD when relax enabled.
ylzsx Dec 29, 2024
91da25e
Modify test for TLSLE when relax enabled.
ylzsx Dec 31, 2024
2066c5f
Add test for loongarch-relax-tls-le.s and modify loongarch-relax-emit…
ylzsx Dec 31, 2024
b57c40e
Modify test. Add --relax option.
ylzsx Jan 16, 2025
56c24f9
Relax TLSDESC code sequence.
ylzsx Dec 31, 2024
880523c
Add test loongarch-relax-tlsdesc.s
ylzsx Dec 31, 2024
a48a2b9
Relax desc_pc_hi20+desc_pc_lo12 ==> desc_pcrel_20
ylzsx Jan 2, 2025
576773c
Modify test loongarch-relax-tlsdesc.s
ylzsx Jan 4, 2025
b2f11e3
Remove --emit-relocs in loongarch-relax-tlsdesc.s
ylzsx Jan 4, 2025
d5c9d64
Modify test. Add --relax option.
ylzsx Jan 17, 2025
a39c190
Convert TLS IE to LE in the normal or medium code model.
ylzsx Jan 2, 2025
78a16b0
Test loongarch-tls-ie.s pass.
ylzsx Jan 3, 2025
4f2dca4
Add test loongarch-relax-tls-ie.s
ylzsx Jan 3, 2025
81d44f2
modify RE_LOONGARCH_GOT.
ylzsx Jan 3, 2025
31a9dab
Fix bug.
ylzsx Jan 21, 2025
83d8b7e
Support relaxation during IE to LE conversion.
ylzsx Jan 3, 2025
6b79432
Modify loongarch-relax-tls-ie.s when relaxation is enabled.
ylzsx Jan 3, 2025
9d99de8
Modify test. Add --relax option.
ylzsx Jan 17, 2025
dff3031
[lld][LoongArch] Implement TLSDESC GD/LD to IE/LE.
ylzsx Jan 3, 2025
459e25d
Modify loongarch-tlsdesc.s and loongarch-tlsdesc-pcrel20-s2.s
ylzsx Jan 3, 2025
894a97a
Modify loongarch-relax-tlsdesc.s init.
ylzsx Jan 4, 2025
5262935
Modify loongarch-relax-tlsdesc.s
ylzsx Jan 4, 2025
653281c
Add comments.
ylzsx Jan 21, 2025
2a30b6c
Revert "Add comments."
ylzsx Jan 21, 2025
0c6ba1d
Delete the wrong flag NEEDS_TLSGD_TO_IE in the extreme code model.
ylzsx Jan 22, 2025
63a756b
Support relaxation during TLSDESC GD/LD to IE/LE conversion.
ylzsx Jan 4, 2025
99a1e07
Modify loongarch-relax-tlsdesc.s.
ylzsx Jan 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "Add comments."
This reverts commit 653281c.
  • Loading branch information
ylzsx committed Jan 21, 2025
commit 2a30b6ca7e30c796d4ffe4d8cf0adb27a24b16c0
3 changes: 0 additions & 3 deletions lld/ELF/Relocations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1400,9 +1400,6 @@ unsigned RelocationScanner::handleTlsRelocation(RelExpr expr, RelType type,
// LoongArch does not support transition from TLSDESC to LE/IE in the extreme
// code model, in which NEEDS_TLSDESC should set, rather than NEEDS_TLSGD. So
// we check independently.
// FIXME: The use of NEEDS_TLSDESC originates from previous implementation.
// Using NEEDS_TLSGD may improve the dynamic linker's loading speed, which
// will be optimized in the future.
if (ctx.arg.emachine == EM_LOONGARCH &&
oneof<RE_LOONGARCH_TLSDESC_PAGE_PC, R_TLSDESC, R_TLSDESC_PC,
R_TLSDESC_CALL>(expr) &&
Expand Down
Loading