-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[LoongArch] Fix the type of tls-le symbols #132324
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
Conversation
@llvm/pr-subscribers-backend-loongarch Author: ZhaoQi (zhaoqi5) ChangesFull diff: https://github.com/llvm/llvm-project/pull/132324.diff 2 Files Affected:
diff --git a/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMCExpr.cpp b/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMCExpr.cpp
index d3d3b90b2527f..f316d94ce0526 100644
--- a/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMCExpr.cpp
+++ b/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMCExpr.cpp
@@ -275,6 +275,7 @@ void LoongArchMCExpr::fixELFSymbolsInTLSFixups(MCAssembler &Asm) const {
case VK_LoongArch_TLS_GD_HI20:
case VK_LoongArch_TLS_DESC_PC_HI20:
case VK_LoongArch_TLS_DESC_HI20:
+ case VK_LoongArch_TLS_LE_HI20_R:
case VK_LoongArch_TLS_LD_PCREL20_S2:
case VK_LoongArch_TLS_GD_PCREL20_S2:
case VK_LoongArch_TLS_DESC_PCREL20_S2:
diff --git a/llvm/test/CodeGen/LoongArch/fix-tle-le-sym-type.ll b/llvm/test/CodeGen/LoongArch/fix-tle-le-sym-type.ll
index fe5f2195f0dc7..d39454a51a445 100644
--- a/llvm/test/CodeGen/LoongArch/fix-tle-le-sym-type.ll
+++ b/llvm/test/CodeGen/LoongArch/fix-tle-le-sym-type.ll
@@ -5,12 +5,12 @@
; RUN: llvm-readelf -s %t-la64 | FileCheck %s --check-prefix=LA64
; LA32: Symbol table '.symtab' contains [[#]] entries:
-; LA32-NEXT: Num: Value Size Type Bind Vis Ndx Name
-; LA32: 00000000 0 NOTYPE GLOBAL DEFAULT UND tls_sym
+; LA32-NEXT: Num: Value Size Type Bind Vis Ndx Name
+; LA32: 00000000 0 TLS GLOBAL DEFAULT UND tls_sym
; LA64: Symbol table '.symtab' contains [[#]] entries:
-; LA64-NEXT: Num: Value Size Type Bind Vis Ndx Name
-; LA64: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND tls_sym
+; LA64-NEXT: Num: Value Size Type Bind Vis Ndx Name
+; LA64: 0000000000000000 0 TLS GLOBAL DEFAULT UND tls_sym
@tls_sym = external thread_local(localexec) global i32
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks! This fixes a link failure issue in Rust.
Failed to cherry-pick: d6dc74e https://github.com/llvm/llvm-project/actions/runs/13988254634 Please manually backport the fix and push it to your github fork. Once this is done, please create a pull request |
/cherry-pick 87adafc |
/pull-request #132361 |
No description provided.