SEARCH_DIR modification

NK asknkj@gmail.com
Sat Mar 5 06:59:00 GMT 2005


Hello All,

I am tring to modify default SEARCH_DIR of LD but have a interesting
observation, could some one help me understand what's happening...

I tried couple of ways to modify it.

1.  Changed during configuration using --with-lib-path=/abc/xyz, it
did compile but cries for libgcc.a made a soft link into /abc/xyz then
I got follwoing error
>>>>>>>>>>>> Error message...
/usr/bin/ld: warning: ld-linux.so.2, needed by /lib/libc.so.6, not found
(try using -rpath or -rpath-link)
/lib/libc.so.6: undefined reference to `_rtld_global@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to
`__libc_enable_secure@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `__libc_stack_end@GLIBC_2.1'
/lib/libc.so.6: undefined reference to `_rtld_global_ro@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_out_of_memory@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `___tls_get_addr@GLIBC_2.3'
/lib/libc.so.6: undefined reference to `_r_debug@GLIBC_2.0'
/lib/libc.so.6: undefined reference to `_dl_argv@GLIBC_PRIVATE'
collect2: ld returned 1 exit status
>>>>>>>>>>>>>>>>>>>

if I create a symobolic link to ld-linux.so.2 to /abc/xyz, it works fine.

2.  When I maually modify the SEARCH_DIR path in eelf_i386.c file and
re-compile the LD. I don't have to link ld-linux.so.2 in /abc/xyz....
I couldn't figure out why?

Can someone through some pointers or help me identifing the issue.

Thanks,
nk



More information about the Binutils mailing list