Commit 4ea904ed authored by Sebastian Huber's avatar Sebastian Huber
Browse files

ld: Clarify --wrap documentation

ld/

	* ld.texi (--wrap): Add example to emphasise that only undefined
	references are replaced by the linker.
parent 8a2d34fe
2019-01-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
* ld.texi (--wrap): Add example to emphasise that only undefined
references are replaced by the linker.
2019-01-09 Nick Clifton <nickc@redhat.com>
* po/es.po: Updated Spanish translation.
......
......@@ -2392,6 +2392,25 @@ you should not put the definition of @code{__real_malloc} in the same
file as @code{__wrap_malloc}; if you do, the assembler may resolve the
call before the linker has a chance to wrap it to @code{malloc}.
Only undefined references are replaced by the linker. So, translation unit
internal references to @var{symbol} are not resolved to
@code{__wrap_@var{symbol}}. In the next example, the call to @code{f} in
@code{g} is not resolved to @code{__wrap_f}.
@smallexample
int
f (void)
@{
return 123;
@}
int
g (void)
@{
return f();
@}
@end smallexample
@kindex --eh-frame-hdr
@kindex --no-eh-frame-hdr
@item --eh-frame-hdr
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment