[PATCH] D30107: Refactor DynamicLibrary so searching for a symbol will have a defined order and libraries are properly unloaded when llvm_shutdown is called.

Philippe Canal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 26 15:18:39 PDT 2017


pcanal added a comment.

> I assume you guys aren't arguing to going back to undefined behavior just because it worked better for you.

Indeed we are not.  We are arguing the current set of patch (and proposed) patch imposed the order (1) then (maybe) (2) while we need (and the previous behavior was 'close' to) (2) then (1)

> I'm totally understand the order being reversed, though I would like to keep an explicit bool

Yes, I think we *must* have such an option.

> Now
>  Z always comes from libRuntime.so

Exactly, so there is no way to override the symbol at run-time.  This counter-intuitive (well wrong in my opinion) in an interactive-compiler.

You can think of the cling-transaction being loaded as a (semantic) shared library that is explicitly linked against all the already loaded libraries.  In such a case the OS would first search the library and then all the library it depends on (i.e is linked against) in reverse order and then finally the process.


Repository:
  rL LLVM

https://reviews.llvm.org/D30107





More information about the llvm-commits mailing list