This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more infromation.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Graham Stoney wrote: > > Dynamic linking is causing me grief however, as follows: > % greyham@brixi% powerpc-linux-gcc hello.c > /opt/gcc-2.95.2/powerpc-linux/bin/ld: warning: ld.so.1, needed by /opt/ppc.linux/glibc-2.1.3-8xx/lib/libc.so.6, not found (try using --rpath) > /opt/ppc.linux/glibc-2.1.3-8xx/lib/libc.so.6: undefined reference to `_dl_init_next@GLIBC_2.0' > > As the warning points out, libc.so.6 can't find ld.so.1. But it's right there > alongside libc.so.6 in /opt/ppc.linux/glibc-2.1.3-8xx/lib/ld.so.1, where the > glibc install put it! > > Using --rpath also helps, but again this should be unnecessary since the > compiler frontend is supposed to tell the linker this kind of stuff. The '-rpath' is for the run-time case (where to search when running), while '-rpath-link' is for the link-time case (where to search when linking). Please try it... ----------------- a clip from 'ld --help' -------------------------------- --retain-symbols-file FILE Keep only symbols listed in FILE -rpath PATH Set runtime shared library search path -rpath-link PATH Set link time shared library search path -shared, -Bshareable Create a shared library -------------------------------------------------------------------------- Perhaps it is a bug that the 'needed by some other' shared libs will not be found via those '-L' options GCC gives to 'ld', but '-rpath-link <libdir>' is the work-around until the bug has been fixed (or it is just a 'feature' which one must know ;-) Cheers, Kai ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |