[PATCH] D138135: [WIP][ELF] Support LoongArch

Jinyang He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 28 03:00:23 PST 2022


MQ-mengqing added inline comments.


================
Comment at: lld/ELF/InputSection.cpp:653
+    // duplicate some logic here.
+    if (sym.isTls()) {
+      if (sym.hasFlag(NEEDS_TLSGD))
----------------
xen0n wrote:
> MQ-mengqing wrote:
> > How about the "la.tls.ie" and "la.tls.gd" do the same symbol?
> > How about the "la.tls.ie" and "la.tls.gd" do the same symbol?
> 
> What do you mean by "do the same symbol" here? Maybe you can tell me in a bit of Chinese if it's easier to explain that way... for now honestly I can't understand. (If you do attach some Chinese phrase I'll take care of translating it.)
Sorry for the ambiguity words. I just care about the follows things,
```
la.tls.ie $r4, y
la.tls.gd $r5, y

.section .tbss
.globl y
y:
.word   0
.size   y, 4
```
It plays differently with gnu as-ld.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138135/new/

https://reviews.llvm.org/D138135



More information about the llvm-commits mailing list