Linker script and dependency search path

Hans-Peter Nilsson hp@bitrange.com
Thu May 20 02:34:00 GMT 2010


On Wed, 19 May 2010, Ludovic Courtès wrote:
> While building the final cross-GCC, linking fails because the cross ld
> cannot find libhurduser.so and libmachuser.so, leading to undefined
> references in libc.so.0*.
>
> Adding -L/path/to/libc, or LIBRARY_PATH=/path/to/libc, or adding
> /path/to/libc to the RUNPATH of libc.so.0* doesn?t solve the problem
> (libhurduser and libmachuser are in the same directory as libc.so.)

You're looking for -rpath-link; cf. ld.info.

brgds, H-P


More information about the Binutils mailing list