[PATCH] D85081: [lld-macho] Support dynamic linking of thread-locals

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 17:57:41 PDT 2020


smeenai accepted this revision.
smeenai added a subscriber: MaskRay.
smeenai added a comment.
This revision is now accepted and ready to land.

> Can you also add a test with both GOT and TLV bindings, to ensure nothing's getting mixed up between the two?

I don't see this one? LGTM otherwise.



================
Comment at: lld/MachO/Symbols.h:63
+  // referenced by both these sections at once.
   uint32_t gotIndex = UINT32_MAX;
 
----------------
smeenai wrote:
> It's slightly confusing to have `gotIndex` possibly refer to the TLV index, but I can't immediately think of a better name (short of `gotOrTlvIndex` or perhaps something like `pointerSectionIndex`).
Do you have any better naming ideas for this?


================
Comment at: lld/test/MachO/tlv-dylib.s:4
+
+# RUN: echo ".section	__DATA,__thread_vars,thread_local_variables; .globl _foo, _bar; _foo:; _bar:" |\
+# RUN:   llvm-mc -filetype=obj -triple=x86_64-apple-darwin -o %t/libtlv.o
----------------
int3 wrote:
> smeenai wrote:
> > The split-file utility was landed last week (rGbcea3a7a288). It might be nicer for some of these tests than the long echo lines.
> ooh, that is a sweet tool
CC @MaskRay :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85081



More information about the llvm-commits mailing list