This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Linker script and dependency search path
- From: ludo at gnu dot org (Ludovic Courtès)
- To: binutils at sourceware dot org
- Date: Wed, 19 May 2010 09:14:53 +0200
- Subject: Linker script and dependency search path
Hello,
Iâm in the process of building a GNU/Linux -> GNU (aka. GNU/Hurd) cross
toolchain.
On GNU, libc.so.0* depends on libhurduser.so and libmachuser.so, which
it lists as NEEDED. libc.so itself is a linker script similar to that
found on GNU/Linux, and it doesnât mention libhurduser.so and
libmachuser.so.
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.)
So, is ld supposed to honor RUNPATH from libc.so.0*, given that this
shared library is only referenced from a âGROUPâ command in libc.so?
What are the search paths used for dependencies of shared libraries
mentioned in a âGROUPâ command?
Thanks,
Ludoâ.