On Wed, Aug 02, 2017 at 12:09:13AM -0400, Ted Unangst wrote: > Mark Kettenis wrote: > > FAIL libexec/ld.so/dlclose/test1/prog3/prog3 > > > > This fails because clang doesn't respect ELF interposition: > > > > http://lists.llvm.org/pipermail/llvm-dev/2016-November/107625.html > > > > We generally frown upon interposition so I can have some sympathy > > for their position here. Probably not a huge issue in practice. > > But we still want to test the ld.so functionality. > > would this affect, for example, a program's ability to override > malloc/free/etc? i'm trying to understand what's not working (or what will not > work). it sounds like i can override malloc in my program, but clang/llvm will > generate "tight" (not sure of the word) bindings to libc malloc within libc? > although this would probably only manifest within translation units with > inlining?
Correct, functions in the same TU can be inlined, even when -fPIC is active. It primarily becomes a problem when using LTO, but I don't think you are that far :) Joerg