command to see version of a library file?
#1
command to see version of a library file?
I had this command saved in a nekochan PM, never occurred to me to write it down back then, and I can't seem to recall how to do it now. I'm trying to find the command that shows me the version of a shared library file, for example when I get this output:

Code:
-bash-4.2$ src/dosbox
64078:src/dosbox: rld: Fatal Error: Cannot Successfully map soname 'libtiff.so.3' version 'sgi3.7' under any of the filenames /usr/nekoware/lib/libtiff.so.3:/usr/freeware/lib32/libtiff.so.3:/usr/local/lib/libtiff.so.3:/usr/local/lib32/libtiff.so.3:/usr/lib32/libtiff.so.3:/usr/lib32/internal/libtiff.so.3:/lib32/libtiff.so.3:/opt/lib32/libtiff.so.3:/usr/nekoware/lib/libtiff.so.3.3:/usr/freeware/lib32/libtiff.so.3.3:/usr/local/lib/libtiff.so.3.3:/usr/local/lib32/libtiff.so.3.3:/usr/lib32/libtiff.so.3.3:/usr/lib32/internal/libtiff.so.3.3:/lib32/libtiff.so.3.3:/opt/lib32/libtiff.so.3.3: 
-bash-4.2$

I would like a way to verify that "version 'sgi3.7'" (or verify I hexeditied the .so file's version info correctly...)

I think it might have been a flag to elfdump, but I don't recall - here is what I was trying to do with freeware's tiff version 3.5.7:


Code:
-bash-4.2# elfdump -c  /usr/freeware/lib32/libtiff.so | grep sgi
        [     3667]: sgi1.1
        [     3684]: sgi1.0
        [     3757]: sgi1.1
        [     1104]: ld32::7.30:ld-options::-elf -_SYSTYPE_SVR4 -OPT:Olimit=0:space=ON -DEBUG:optimize_space=on -OPT:IEEE_arithmetic=1:roundoff=0:wrap_around_unsafe_opt=off -mips3 -n32 -shared -rdata_shared -check_registry ../libtiff/../port/irix/so_locations -quickstart_info -o libtiff.so -woff1009,1014,1107,1110,1116,1164,1185,1188,1204,1230,1233 -woff 85 -woff 84 -L -L/xlv1/freeware/2002.Nov/tiff/v3.5.7-root/usr/freeware/lib32 -L/xlv1/freeware/2002.Nov/tiff/v3.5.7-root/usr/freeware/lib32 -L/xlv1/freeware/2002.Nov/tiff/v3.5.7-root/usr/freeware/lib32 -L/xlv1/freeware/2002.Nov/tiff/v3.5.7-root/usr/lib32 -ljpeg -lz -dont_warn_unused -Bdynamic -lc -warn_unused -rpath /usr/freeware/lib32 -set_version sgi1.1 :
-bash-4.2# 
gijoe77
Tezro

Posts: 492
Threads: 30
Joined: Jun 2018
Find Reply
12-01-2018, 02:29 PM
#2
RE: command to see version of a library file?
From the top of my head, try 'elfdump -L libtiff.so'
dexter1
Global Moderator
******

Posts: 175
Threads: 10
Joined: May 2018
Find Reply
12-02-2018, 12:00 AM
#3
RE: command to see version of a library file?
ok sweet, I think that's it! thanks!
gijoe77
Tezro

Posts: 492
Threads: 30
Joined: Jun 2018
Find Reply
12-02-2018, 03:01 AM
#4
RE: command to see version of a library file?
(12-02-2018, 03:01 AM)gijoe77 Wrote:  ok sweet, I think that's it! thanks!

I'm a noob to IRIX sysadmin and trying to sort the same issue (with nekoware emacs, which needs libtiff.so.3 for sgi3.8. I tried a symlink to ver 6.0 first, but that just caused it to complain about the lack of sgi3.8.

Can you expand a bit on how to use a hexeditor (and I assume a copy of the file) to fix this issue?
callahan
Octane

Posts: 26
Threads: 7
Joined: Dec 2018
Find Reply
01-09-2019, 04:13 AM
#5
RE: command to see version of a library file?
give this a try, let me know if this works for you.  look at the IVERSION (I think...):

Code:
-bash-4.2# elfdump -L /usr/nekoware/lib/libtiff.so.3

/usr/nekoware/lib/libtiff.so.3:

 **** DYNAMIC SECTION INFORMATION ****
.dynamic :
[Index] Tag         Value
[0]     HASH        0x402a20
[1]     STRTAB      0x400374
[2]     SYMTAB      0x404330
[3]     STRSZ       0x26aa
[4]     SYMENT      0x10
[5]     INIT        0
[6]     FINI        0
[7]     RLDVERS     0x1
[8]     FLAGS       0x6411
[9]     BASEADDR    0x400000
[10]    CNFLCTNO    0x30
[11]    LBLISTNO    0x7
[12]    SYMTABNO    0x242
[13]    GP_VALUE    0x4befe8
[14]    UNREFEXT    0x11
[15]    GOTSYM      0x146
[16]    LOCALPG     0x1
[17]    LOCALPG     0x15
[18]    LOCAL       0x24
[19]    HIDDEN      0x24
[20]    PROTECT     0xab
[21]    LOCGOTNO    0xab
[22]    PLTGOT      0x4b6ff8
[23]    RLDTXT_ADR  0xfb602ac
[24]    OPTIONS     0x4000d8
[25]    LIBLIST     0x4002e8
[26]    NEEDED      libpthread.so
[27]    NEEDED      libjbig.so.1.0
[28]    NEEDED      libjpeg.so.63
[29]    NEEDED      libfastm.so
[30]    NEEDED      libz.so
[31]    NEEDED      libm.so
[32]    NEEDED      libc.so.1
[33]    SYMLIB      0x406750
[34]    SONAME      libtiff.so.3
[35]    RPATH       /usr/nekoware/lib
[36]    TIMSTAMP    Jan 19 12:48:16 2013        
[37]    CHECKSUM    0xc1781bf
[38]    IVERSION    sgi3.7
[39]    REL         0x406994
[40]    RELSZ       0x2cd0
[41]    RELENT      0x8
[42]    MSYM        0x409664
[43]    CONFLICT    0x40a874
[44]    IFACE       0
[45]    IFACE_SZ    0x60

                  **** MIPS LIBLIST INFORMATION ****
.liblist :
[INDEX] Timestamp               Checksum        Flags   Name            Version
[1]     Oct  8 17:14:50 2009    0xaa05643       -----   libpthread.so   sgi1.0
[2]     Nov  1 11:09:25 2011    0x6a84b3d8      -----   libjbig.so.1.0  0
[3]     Jul  3 15:35:38 2012    0x8f157927      -----   libjpeg.so.63   62.0
[4]     Oct  8 17:14:53 2009    0xd34d86e8      -----   libfastm.so     sgi1.0
[5]     Feb  3 16:55:42 2010    0x6a966b1a      -----   libz.so sgi1.2.3
[6]     Oct  8 17:14:52 2009    0xd0c0aa58      -----   libm.so sgi1.0
[7]     Jul 20 18:20:32 2006    0x20e66fe7      -----   libc.so.1       sgi1.0
-bash-4.2# exit
logout
-bash-4.2$ cp /usr/nekoware/lib/libtiff.so.3 /tmp
-bash-4.2$ cd /tmp
-bash-4.2$ hexedit libtiff.so.3

hit tab to go to asci side
cntr+s to search, type sgi3.7
change sgi3.7 to sgi3.8 
hit F2 to save 
cntr+x to exit

(I would do one change at a time, try emacs again to see if it works, if not do a search for the next instance of sgi3.7, rinse+repeat) 

Code:
-bash-4.2$ elfdump -L ./libtiff.so.3

./libtiff.so.3:

 **** DYNAMIC SECTION INFORMATION ****
.dynamic :
[Index] Tag         Value
[0]     HASH        0x402a20
[1]     STRTAB      0x400374
[2]     SYMTAB      0x404330
[3]     STRSZ       0x26aa
[4]     SYMENT      0x10
[5]     INIT        0
[6]     FINI        0
[7]     RLDVERS     0x1
[8]     FLAGS       0x6411
[9]     BASEADDR    0x400000
[10]    CNFLCTNO    0x30
[11]    LBLISTNO    0x7
[12]    SYMTABNO    0x242
[13]    GP_VALUE    0x4befe8
[14]    UNREFEXT    0x11
[15]    GOTSYM      0x146
[16]    LOCALPG     0x1
[17]    LOCALPG     0x15
[18]    LOCAL       0x24
[19]    HIDDEN      0x24
[20]    PROTECT     0xab
[21]    LOCGOTNO    0xab
[22]    PLTGOT      0x4b6ff8
[23]    RLDTXT_ADR  0xfb602ac
[24]    OPTIONS     0x4000d8
[25]    LIBLIST     0x4002e8
[26]    NEEDED      libpthread.so
[27]    NEEDED      libjbig.so.1.0
[28]    NEEDED      libjpeg.so.63
[29]    NEEDED      libfastm.so
[30]    NEEDED      libz.so
[31]    NEEDED      libm.so
[32]    NEEDED      libc.so.1
[33]    SYMLIB      0x406750
[34]    SONAME      libtiff.so.3
[35]    RPATH       /usr/nekoware/lib
[36]    TIMSTAMP    Jan 19 12:48:16 2013        
[37]    CHECKSUM    0xc1781bf
[38]    IVERSION    sgi3.8
[39]    REL         0x406994
[40]    RELSZ       0x2cd0
[41]    RELENT      0x8
[42]    MSYM        0x409664
[43]    CONFLICT    0x40a874
[44]    IFACE       0
[45]    IFACE_SZ    0x60

                  **** MIPS LIBLIST INFORMATION ****
.liblist :
[INDEX] Timestamp               Checksum        Flags   Name            Version
[1]     Oct  8 17:14:50 2009    0xaa05643       -----   libpthread.so   sgi1.0
[2]     Nov  1 11:09:25 2011    0x6a84b3d8      -----   libjbig.so.1.0  0
[3]     Jul  3 15:35:38 2012    0x8f157927      -----   libjpeg.so.63   62.0
[4]     Oct  8 17:14:53 2009    0xd34d86e8      -----   libfastm.so     sgi1.0
[5]     Feb  3 16:55:42 2010    0x6a966b1a      -----   libz.so sgi1.2.3
[6]     Oct  8 17:14:52 2009    0xd0c0aa58      -----   libm.so sgi1.0
[7]     Jul 20 18:20:32 2006    0x20e66fe7      -----   libc.so.1       sgi1.0
-bash-4.2$
gijoe77
Tezro

Posts: 492
Threads: 30
Joined: Jun 2018
Find Reply
01-10-2019, 12:19 PM
#6
RE: command to see version of a library file?
Thanks, I'll give that a try.
callahan
Octane

Posts: 26
Threads: 7
Joined: Dec 2018
Find Reply
01-10-2019, 02:41 PM
#7
RE: command to see version of a library file?
Holy crap, it worked! I'm in a bit of a state of disbelief that I just successfully used hexedit to 'hack' some library file. Thank you!

Me, right now: https://www.youtube.com/watch?v=V4MF2s6MLxY
callahan
Octane

Posts: 26
Threads: 7
Joined: Dec 2018
Find Reply
01-11-2019, 02:47 AM
#8
RE: command to see version of a library file?
awesome!
gijoe77
Tezro

Posts: 492
Threads: 30
Joined: Jun 2018
Find Reply
01-12-2019, 01:25 AM


Forum Jump:


Users browsing this thread: 1 Guest(s)