1821984 Members
3300 Online
109638 Solutions
New Discussion юеВ

*.so and *.sl files

 
SOLVED
Go to solution
Shivkumar
Super Advisor

*.so and *.sl files

Hi,

What is difference between files having *.so and *.sl extension ? I know they are shared object and shared library but wanted to know in what respect they differ ?

Thanks,
Shiv
7 REPLIES 7
Arunvijai_4
Honored Contributor
Solution

Re: *.so and *.sl files

Hi Shiv,

*.so shared libraries are used in HP-UX 11.20 and upwards.

*.sl are used in PA-RISC (11.11)

Basically, *.so files reside in /usr/lib/hpux32 and /usr/lib/hpux64/ on Itanium.

*.sl resides in /usr/lib

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Geoff Wild
Honored Contributor

Re: *.so and *.sl files

.sl and .so are both shared libraries...

This page gives a good overview of Shared Object and Static libraries:

http://users.actcom.co.il/~choo/lupg/tutorials/libraries/unix-c-libraries.html

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
H.Merijn Brand (procura
Honored Contributor

Re: *.so and *.sl files

In content there is no difference.

HP-UX (pa-risc) prefers .sl, while the Linux, Solaris, and AIX world uses .so

The problem with some GNU utils that produce these .so's is that they create ONE object, called shr.o, and promote that to a shared object or shared library with ld -b

That means that the shr.o includes all the exported varioables of the library, and that if needed only one function, it loads all the others at the same time, causing sometimes name conflicts with other libraries, so that the functions you wanted from liba is now forced from libb because libb was the only lib to define function foo () you so desperately wanted to use.

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Sung Oh
Respected Contributor

Re: *.so and *.sl files

Hi Shiv,

Here is good reference site for .sl and .so

http://ptolemy.berkeley.edu/ptolemyclassic/almagest/docs/user/html/sharedlib.doc1.html

Regards,

Sung
Raj D.
Honored Contributor

Re: *.so and *.sl files

Shiv ,

An extract from the above:

A shared library consists of an archive of object files (.o files) collected into one file by either the compiler or the linker. Usually, to create a shared library, the .o files must be compiled into Position Independent Code (PIC) by the compiler. The compiler usually has a special option to produce PIC code, under gcc/g++, the -fPIC option produces PIC code. Shared libraries have suffixes that are architecture dependent: under SunOS4.1 and Solaris, shared libraries end with .so (i.e., libg++.so); under HPUX, shared libraries end with .sl (i.e., libg++.sl).


Example:
/etc/opt/resmon/lib/libresmon.sl
/opt/netscape/plugins/libnullplugin.so


# file /etc/opt/resmon/lib/libresmon.sl
/etc/opt/resmon/lib/libresmon.sl: PA-RISC1.1 shared library -not stripped

---
# file /opt/netscape/plugins/libnullplugin.so
/opt/netscape/plugins/libnullplugin.so: PA-RISC1.1 shared library -not stripped
----



Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Sam Koh
New Member

Re: *.so and *.sl files

Hi

Understand that

*.so is generally used in HPUX based on Itanium platform while *.sl is generally used in HPUX based on PA-RISC platofrm

But can Itaium-based HPUX use *.sl as well? If so, is there any any useful documentation can you experts can point me to?
Dennis Handly
Acclaimed Contributor

Re: *.so and *.sl files

>But can Integrity HPUX use *.sl as well? is there any any useful documentation ...

Yes, but it isn't recommended, see ld(1) under -lx:
http://docs.hp.com/en/B2355-60103/ld.1.html