[PATCH] D13345: [ELF2] Add --undefined option

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 2 10:38:32 PDT 2015


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM


================
Comment at: ELF/SymbolTable.cpp:91
@@ +90,3 @@
+template <class ELFT> void SymbolTable::addUndefinedSym(StringRef Name) {
+  Undefined<ELFT>::SyntheticOptional.setVisibility(STV_HIDDEN);
+  resolve<ELFT>(new (Alloc)
----------------
This is not guaranteed to be thread-safe since if this function is called simultaneously, two assignments could run at the same time, and although that looks benign, that's a race condition.

It is OK for now. We don't do multi-threading soon. We probably want to have a init() function for each file which initialize static members. We can do that later.


http://reviews.llvm.org/D13345





More information about the llvm-commits mailing list