where is the dymatic lib to find


 
Thread Tools Search this Thread
Top Forums Programming where is the dymatic lib to find
# 1  
Old 01-05-2009
where is the dymatic lib to find

hi all

lyang0@lyang0:~$ ldd /bin/ls
linux-gate.so.1 => (0xb7f1c000)
librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7f02000)
libselinux.so.1 => /lib/libselinux.so.1 (0xb7ee9000)
libacl.so.1 => /lib/libacl.so.1 (0xb7ee1000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7d92000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7d7a000)
/lib/ld-linux.so.2 (0xb7f1d000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7d76000)
libattr.so.1 => /lib/libattr.so.1 (0xb7d72000)

you can see libc.so.6 => /lib/tls/i686/cmov/libc.so.6,but how the linker know where to find it,I know the lib path can be find by using ld.so.conf, but /lib/tls/i386 is not in the ld.so.conf, please give me a light

thanks
# 2  
Old 01-05-2009
The "tls" path is added by ld (the dynamic linker) in a compile-time search path. The TLS means that the library thread safe ("thread local storage"). There's some detailed information here. Anyway, the i386 is also a compile-time search path, and is platform-specific. This way i386 libraries and i686 libraries can be distinguished. If a program is compiled with the i386 instruction set, the linker will search for an i386 library. If it's compiled for the i686 instruction set, the linker will search first in i686, and then in i386.

The "cmov" refers to an instruction that is available in some -- but not all -- i686 architectures. So this is logically another compile-time search path, relevant to i686 libraries. (First look for the library in i686/cmov; if not found, look in i686/). More info found here.
# 3  
Old 01-07-2009
hi otheus

I don't understand the compile time serch lib ,can you make a commet about complie time serch path and run time serch path,and where is the path defined .
one more thing I run
lyang0@lyang0:~$ gcc -print-search-dirs | grep libraries | tr '=:' '\n'
libraries

/usr/lib/gcc/i486-linux-gnu/4.2.3/
/usr/lib/gcc/i486-linux-gnu/4.2.3/
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../i486-linux-gnu/lib/i486-linux-gnu/4.2.3/
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../i486-linux-gnu/lib/../lib/
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../i486-linux-gnu/4.2.3/
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/
/lib/i486-linux-gnu/4.2.3/
/lib/../lib/
/usr/lib/i486-linux-gnu/4.2.3/
/usr/lib/../lib/
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../i486-linux-gnu/lib/
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../
/lib/
/usr/lib/

I don't find the /lib/tls/i686 in the library serch paths
please help me to catch on this question
Thanks
# 4  
Old 01-07-2009
Compile-time search path of "ld.so" the run-time dynamic linker, not the program you're trying to run. Do this at the command line:
Code:
LD_DEBUG=libs /bin/true

Replace "/bin/true" with the full path of the program you intend to run. You will see the paths that the dynamic linker searches for the dependencies.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Can't CD to lib ??? why

Hi, I have root access and user name called prod. but it doesn't matter which user I log in as. But I can't CD to the directory. Can you advise. dr-xr-xr-x 1 root root 1 Sep 12 15:40 lib $id uid=4902(prod) gid=50(develop) $cd lib -bash: cd: lib: Permission... (7 Replies)
Discussion started by: samnyc
7 Replies

2. AIX

LIB Version

Hi...please help with command to find the library version on AIX server ---------- Post updated at 12:50 PM ---------- Previous update was at 12:31 PM ---------- AIX version is 6.1.Please (4 Replies)
Discussion started by: Sanal
4 Replies

3. Red Hat

Lib missing

Hai dear, I am installing some application on linux RedHat 9 It gives me following discrepancies lib.so.6 (GLIBC_2.3.4) needed lib.so.6 (GLIBC_2.4) needed libpthread.so.0(GLIBC_2.3.3) needed rtld(GNU_HASH) needed i tried to search a lot on internet to find relative rpm for these libs... (3 Replies)
Discussion started by: Danish Shakil
3 Replies

4. Red Hat

ls: /lib/libattr.so.1: no version information available (required by /lib/libacl.so.1)

Hello, I'm experimenting a problem on my rh server. Red Hat Enterprise Linux AS release 3 (Taroon Update 8) 2.4.21-47.ELsmp #1 SMP i686 i686 i386 GNU/Linux It started with a segmentation fault on #id root To resolve it, I've installed coreutils-4.5.3-28.4.i386.rpm But, I... (6 Replies)
Discussion started by: gogol_bordello
6 Replies

5. Programming

Question on using gd lib with c++

Hello, I'm trying to use gd with c++ in linux. Previously, I had already succeed using the gd lib in windows through gdwin32. Now I would like to run the program in linux but i'm not sure how to do it. I'm currently try running it in cygwin, but I couldn't compiled it. Any suggestion? (3 Replies)
Discussion started by: shahrulb
3 Replies

6. Programming

2D Graphics Lib

Hi, I am on Fedora9 and need to do some simple 2D graphics (for game development). I am looking for an ideal 2D library/package to be used with GCC. I have come accross GRX, libmxi and some OpenGL (The 3D), but none of which seems to be ok. I could not find any tutorial or support material... (1 Reply)
Discussion started by: nasersh
1 Replies

7. Programming

To use lib or lib32?

A good day to you, dear experts, I am a newbie, I noticed in binutils or gcc there are lib and lib32 and lib64, to take binutils as an example, My system is sgi IRIX6.5, which is suggested to use "n32" flag during the compiling and linking, is that mean that I need to use lib32? Q1. which one... (2 Replies)
Discussion started by: lakeat
2 Replies

8. HP-UX

Can't find /lib/libz.so.1

Hi, I am new to unix. But, I write programs in progress that run on an HP-UX. We are running a program and it is looking for the file /lib/libz.so.1 Naturally, we do have ZLIB 1.2.3 installed, and I can only find files called libz.sl.1 libz.a libz.sl.1.2.3 None of these files are... (2 Replies)
Discussion started by: tariqjamal
2 Replies

9. Linux

ct-lib on Lynix

Hi Friends ! Where can I get free ct-lib for Lynix ?? My problem is something like this-- Sybase server is running on a Solaris machine. Now I trying to access the Sybase from a Lynix machine for which i need ct-lib. I tried by downloading some free ct-libs for Lynix on the net, but they... (2 Replies)
Discussion started by: mrgubbala
2 Replies

10. Programming

LIB question

a program on linux uses three libs: libutil.a libtermcap.a libpthread.a. If I want to transplant this program to Solaris, where can I get the three libs? Thanks. (2 Replies)
Discussion started by: hewlet
2 Replies
Login or Register to Ask a Question