If your re-implemented
are within an object that is contained within a library file, the
linker does not automatically include the object. This can result
being excluded from the image you have built. To avoid this problem,
that is, to ensure that your
are called, you can either:
Place your mutex functions in a non-library object file. This helps to ensure that they are resolved at link time.
Place your mutex functions in a library object file, and arrange a non-weak reference to something in the object.
Place your mutex functions in a library object file, and have the linker explicitly extract the specific object from the library on the command line by writing
when you invoke the linker.