Interposing in Mavericks


Somewhere along Lion or Mountain Lion Apple switched from gcc to clang as the default compiler.
One of the things that clang does differently is it does not create a Mach DATA section for interposing.

Below is a screenshot of MachOView on dynamic libraries compiled by gcc and clang respectively (I've used the Mavericks gcc 4.9 binary downloaded from High Performance Computing).


I've no idea if clang can be instructed to create the DATA interpose section but if you need to use it in recent Mac OS X versions compiling with gcc still works.