This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Does the LD --wrap feature work for library internal references?
Hi Sebastian,
>> Is it possible that the _bsd_ether_output function has been inlined into
> It is not inlined, but its only reference is done via a function pointer assignment here:
> ifp->if_output = ether_output;
> ifp->if_input = ether_input;
> Does the wrap feature work for function pointer assignments?
Hmmm, interesting. Is the ether_input function also only referenced
in this way ? (Because you said that the ether_input function was being
wrapped, yes ?)
Generally speaking function pointer assignment should be subject to
linker wrapping, but there are still some possible explanations for
this behaviour. For example, is the if_output function pointer ever
used in the code ? If not, then the compiler might be dropping the
initialization of the if_output field, since it is never needed.
Cheers
Nick