[PATCH] D112831: [lld][WebAssembly] Handle TLS variables in Symbol::getVA. NFC

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 29 09:36:58 PDT 2021


sbc100 added inline comments.


================
Comment at: lld/wasm/InputFiles.cpp:182
-    if (D->segment && D->segment->outputSeg->isTLS())
-      return D->getOutputSegmentOffset() + reloc.Addend;
-
----------------
This is taken care of now simply my marking the symbols as TLS which happens elsewhere in this file:

```
    // Older object files did not include WASM_SEG_FLAG_TLS and instead                  
    // relied on the naming convention.  To maintain compat with such objects    
    // we still imply the TLS flag based on the name of the segment.             
    if (!seg->isTLS() &&                                                         
        (seg->name.startswith(".tdata") || seg->name.startswith(".tbss"))) {     
      seg->flags |= WASM_SEG_FLAG_TLS;                                           
      seg->implicitTLS = true;                                                   
    } 
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112831



More information about the llvm-commits mailing list