This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Does the LD --wrap feature work for library internal references?


On Thu, Jan 10, 2019 at 02:12:53PM +0100, Sebastian Huber wrote:
> On 10/01/2019 14:08, Alan Modra wrote:
> > On Thu, Jan 10, 2019 at 01:14:22PM +0100, Sebastian Huber wrote:
> > > from the documentation
> > > 
> > > "Use a wrapper function for symbol. Any undefined reference to symbol will
> > > be resolved to __wrap_symbol. Any undefined reference to __real_symbol will
> > > be resolved to symbol. "
> > Note "undefined reference".  The references you want wrapped should
> > not be defined in the same file.
> 
> In my example there is a file "f.c":
> There is also a "g.c":

Not in the example you posted at
https://sourceware.org/ml/binutils/2019-01/msg00022.html

I modified your testcase to an example that works at
https://sourceware.org/ml/binutils/2019-01/msg00070.html

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]