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

Nick Clifton nickc@redhat.com
Fri Jan 4 14:27:00 GMT 2019


Hi Sebastian,

> I don't use link-time optimization. I am sure the functions ether_input() and ether_output() are present in the executable.

OK, but my guess is that the compiler has already done something clever
so that those symbols are never referenced, and hence wrapping the symbols
has no effect.  (You could look in the object file and see if the symbols
are used in one or more relocations...)

Alternatively maybe there really is a bug in the linker's wrapping code.
But I have no idea what it might be, or why this particular situation is
causing problems.  If you do think that it is a linker bug though, please
could you put together a small test case to demonstrate the problem ?  
Ideally using assembler source files rather than C/C++ sources, so that
we do not have to worry about compiler optimizations.

Cheers
  Nick




More information about the Binutils mailing list