Force specified function to be linked to a specified lib whencompiling/linking

Nick Clifton nickc@redhat.com
Fri Jul 21 12:18:00 GMT 2017


Hi Yubin,

> What I want to do here is to have the internal standard malloc linked to the
> right place, not the one we created:

> as you see, I want the `__real_malloc' to be linked to the standard malloc
> implementation. And in this situation, user don't know any internal changes.
> They just use it as usual.

I do not think that this is a good idea.  Changing a system or library function
without the user's awareness is a bad thing, and could lead to all kinds of abuse.

If you want an application to use an augmented function then the programmer should
be told how to do this, and allowed the choice of whether or not to follow through.

Cheers
  Nick



More information about the Binutils mailing list