meditationatae

Just another WordPress.com site

Using the ldd command with the verbose option

With respect to the readline library, some versions have various symbols (UP, etc.) defined, and some do not.

For PARI/gp on my system, it only works when these various symbols are defined.

 

PARI/gp question: how does one get a history of the commands input at the terminal ?

 

 

We are in the directory:  /usr/local/lib .

ls -l gives output:

-rw-r–r–. 1 root root 1291398 Feb 22 12:51 libgmp.a
-rwxr-xr-x. 1 root root 913 Feb 22 12:51 libgmp.la
lrwxrwxrwx. 1 root root 16 Feb 22 12:51 libgmp.so -> libgmp.so.10.3.2
lrwxrwxrwx. 1 root root 16 Feb 22 12:51 libgmp.so.10 -> libgmp.so.10.3.2
-rwxr-xr-x. 1 root root 523381 Feb 22 12:51 libgmp.so.10.3.2
-rw-r–r–. 1 root root 162874 Feb 23 02:55 libhistory.a
-rw-r–r–. 1 root root 171982 Feb 22 14:11 libhistory.old
lrwxrwxrwx. 1 root root 15 Feb 23 02:55 libhistory.so -> libhistory.so.6
lrwxrwxrwx. 1 root root 17 Feb 23 02:55 libhistory.so.6 -> libhistory.so.6.3
-r-xr-xr-x. 1 root root 99093 Feb 23 02:55 libhistory.so.6.3
lrwxrwxrwx. 1 root root 21 Feb 22 14:11 libhistory.so.7 -> libhistory.so.7.0.old
-r-xr-xr-x. 1 root root 106376 Feb 22 14:11 libhistory.so.7.0
-r-xr-xr-x. 1 root root 106376 Feb 22 12:35 libhistory.so.7.0.old
-rwxr-xr-x. 1 root root 7060519 Feb 23 11:55 libpari-gmp.so.2.9.1
lrwxrwxrwx. 1 root root 20 Feb 23 11:55 libpari-gmp.so.5 -> libpari-gmp.so.2.9.1
lrwxrwxrwx. 1 root root 20 Feb 23 11:55 libpari.so -> libpari-gmp.so.2.9.1
-rw-r–r–. 1 root root 1199592 Feb 23 02:55 libreadline.a
-rw-r–r–. 1 root root 1239926 Feb 22 14:11 libreadline.old
lrwxrwxrwx. 1 root root 16 Feb 23 02:55 libreadline.so -> libreadline.so.6
lrwxrwxrwx. 1 root root 25 Mar 10 08:32 libreadline.so.6 -> /lib64/libreadline.so.6.0
-r-xr-xr-x. 1 root root 680148 Feb 23 02:55 libreadline.so.6.3
lrwxrwxrwx. 1 root root 22 Feb 22 14:11 libreadline.so.7 -> libreadline.so.7.0.old
-r-xr-xr-x. 1 root root 702910 Feb 22 14:11 libreadline.so.7.0
-r-xr-xr-x. 1 root root 702910 Feb 22 12:35 libreadline.so.7.0.old
drwxr-xr-x. 2 root root 4096 Feb 23 11:55 pari

 

I single out the libreadline text:

lrwxrwxrwx. 1 root root 16 Feb 23 02:55 libreadline.so -> libreadline.so.6
lrwxrwxrwx. 1 root root 25 Mar 10 08:32 libreadline.so.6 -> /lib64/libreadline.so.6.0

 

The ‘l’ signifies a symbolic link, so that

libreadline.so is an alias name for libreadline.so.6, and

libreadline.so.6 is an alias name for /lib64/libreadline.so.6.0 , and

/lib64/libreadline.so.6.0 is a normal file:

$ ls -l /lib64/libreadline.so.6.0
-rwxr-xr-x. 1 root root 272008 Jun 22 2012 /lib64/libreadline.so.6.0    (272 kbytes ).

 

Now, I try:

$ ldd -v libreadline.so  and I get this:

 

linux-vdso.so.1 => (0x00007ffd3c5fc000)
libtinfo.so.5 => /lib64/libtinfo.so.5 (0x0000003b0fa00000)
libc.so.6 => /lib64/libc.so.6 (0x0000003afce00000)
/lib64/ld-linux-x86-64.so.2 (0x0000003afc600000)

Version information:
./libreadline.so:
libc.so.6 (GLIBC_2.4) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.3) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.3.4) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.11) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
/lib64/libtinfo.so.5:
libc.so.6 (GLIBC_2.4) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.3) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.3.4) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
/lib64/libc.so.6:
ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2

 

Note: there are no missing symbols.

 

What about libreadline.so.6.3 ? It looks just as good…

 

$ ldd -v libreadline.so.6.3         gives output:

linux-vdso.so.1 => (0x00007ffdd6951000)
libc.so.6 => /lib64/libc.so.6 (0x00007f815ed7e000)
/lib64/ld-linux-x86-64.so.2 (0x0000003afc600000)

Version information:
./libreadline.so.6.3:
libc.so.6 (GLIBC_2.3) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
/lib64/libc.so.6:
ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2

===

It looks good too, although  /lib64/libtinfo.so.5 present in first is what defines UP etc.

 

===

Another try, this time with:  libreadline.so.7.0

 

$ ldd -v libreadline.so.7.0
linux-vdso.so.1 => (0x00007fff4e3b2000)
libc.so.6 => /lib64/libc.so.6 (0x00007f301dec9000)
/lib64/ld-linux-x86-64.so.2 (0x0000003afc600000)

Version information:
./libreadline.so.7.0:
libc.so.6 (GLIBC_2.3) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
/lib64/libc.so.6:
ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2

 

===

this one also doesn’t have

/lib64/libtinfo.so.5.

===

linux-vdso.so.1 => (0x00007ffe2756a000)
libc.so.6 => /lib64/libc.so.6 (0x0000003afce00000)
/lib64/ld-linux-x86-64.so.2 (0x0000003afc600000)

Version information:
/lib64/libtinfo.so.5:
libc.so.6 (GLIBC_2.4) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.3) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.3.4) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
/lib64/libc.so.6:
ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2

===

Advertisements

Written by meditationatae

March 17, 2017 at 6:12 pm

Posted in History

%d bloggers like this: