Moving glibc and ld-linux.so?

William A. Gatliff bgat@saturn.billgatliff.com
Thu Oct 18 18:31:00 GMT 2001


Rodney:


See ld's --dynamic-linker and related options.  I think there's a -R
option for gcc that does the same thing.

In the playing around I've done on this, I've successfully moved
around glibc by making sure that the paths in libc.so are correct (or
nonexistent), and by linking with -Wl,-R/lib.  Or something like that.

HTH,

b.g.

On Thu, Oct 18, 2029 at 02:43:29PM -0700, Rodney Smith wrote:
> Is there a correct way to build the toolchain to allow the runtime libs 
> (glibc) to be relocated to '/lib'?
> 
> I'm getting runtime errors with a bad search path (/opt...) when I try to run 
> something with glibc. I created the cross-compiler toolchain with 
> '-prefix=/opt[...]' (with the libs underneath that), but at runtime on the 
> embedded machine I want to put the libs in the usual directory '/lib'. I'm 
> finding that most of the libs are linked to '/opt/.../ld-linux.so.2' when I'd 
> like them to be '/lib/ld-linux.so.2'. Is there a way to configure glibc to 
> install to '/opt/[...]' but be ready to run at '/lib'?
> 
> -Rodney Smith
> DoIT Technology
> 
> 
> ------
> Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
> 

-- 
Bill Gatliff
bgat@billgatliff.com

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list