[PATCH] D20741: [LibFuzzer] Fix weak linking issues building tests under OSX.

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Fri May 27 16:05:10 PDT 2016

kcc added a comment.

In http://reviews.llvm.org/D20741#442890, @delcypher wrote:

> @kcc:
> > Let's try dlsym. Let's create a separate file for that.
> Do you also want to use the dlsym implementation on Linux? I'm imagining a struct containing function pointers to all the functions that were previously declared weak. We could have a different implementation for initializing those function pointers for different platforms or we could have OSX and Linux both share the same implementation. What would you prefer?

I expect dlsym to work equally well on linux, so, yes, let's make it the same on both. 
+1 to struct of function pointers. Declare it in a separate header file, initialize it in a separate .cpp file. 
FuzzerDlsym.cpp?  FuzzerWeakSymbols.cpp? [naming is hard]


More information about the llvm-commits mailing list