[PATCH] D23552: [ELF] - Give automatically generated __start_* and __stop_* symbols default visibility.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 18 00:04:57 PDT 2016


grimar added inline comments.

================
Comment at: ELF/SymbolTable.cpp:425
@@ -424,3 +424,3 @@
   std::tie(S, WasInserted) =
-      insert(N, STT_NOTYPE, STV_HIDDEN, /*CanOmitFromDynSym*/ false,
+      insert(N, STT_NOTYPE, StOther & 3, /*CanOmitFromDynSym*/ false,
              /*IsUsedInRegularObj*/ true, nullptr);
----------------
ruiu wrote:
> I'm not the type of person who wants to eliminate all constants, but 3? It's too magical.
Actually it is used in many places in lld. I count 4 more places in this file (SymbolTable.cpp) and also once in Symbols.h:

```
uint8_t getVisibility() const { return StOther & 0x3; }
```

I suggest to leave it for now and fix once for all places if you want it.


https://reviews.llvm.org/D23552





More information about the llvm-commits mailing list