[PATCH] D15049: [asan] Skip all non-shared objects in FindFirstDSOCallback.

Ed Maste via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 7 11:33:25 PST 2015


emaste added a comment.

In http://reviews.llvm.org/D15049#304105, @eugenis wrote:

> One idea: it looks like we can rely on the fact that the main executable is the first one in dl_iterate_phdr (is it? what about LD_PRELOAD?). If so, you can walk its dynamic section and look for DT_NEEDED records.


On FreeBSD the main executable is the first one in dl_interate_phdr's callback, but there is currently no guarantee that this won't change.


http://reviews.llvm.org/D15049





More information about the llvm-commits mailing list