[PATCH] D33856: [ELF] Define __dso_handle symbol if needed

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 5 12:47:26 PDT 2017


phosek added inline comments.


================
Comment at: ELF/Writer.cpp:916
+  // included statically and cannot be a part of a shared library.
+  addOptionalRegular<ELFT>("__dso_handle", Out::ElfHeader, 0, STV_HIDDEN);
+
----------------
ruiu wrote:
> Don't you want to do this only when `Config->Shared`?
The frontend generates the `__dso_handle` reference in any case because it doesn't whether the code is going to be linked into a shared library or not so we need to generate this symbol even in the non-shared case.


Repository:
  rL LLVM

https://reviews.llvm.org/D33856





More information about the llvm-commits mailing list