diff --git a/ld/ld.texi b/ld/ld.texi index 6d016ecc347..73f5917db17 100644 --- a/ld/ld.texi +++ b/ld/ld.texi @@ -2323,8 +2323,19 @@ Any directories specifed by a @code{SEARCH_DIR} command in the linker script being used. @end enumerate +Note however on Linux based systems there is an additional caveat: If +the @option{--as-needed} option is active @emph{and} a shared library +is located which would normally satisfy the search @emph{and} this +library does not have DT_NEEDED tag for @file{libc.so} +@emph{and} there is a shared library later on in the set of search +directories which also satisfies the search @emph{and} +this second shared library does have a DT_NEEDED tag for +@file{libc.so} @emph{then} the second library will be selected instead +of the first. + If the required shared library is not found, the linker will issue a warning and continue with the link. + @end ifset @kindex -shared