LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-13-2010, 03:40 PM   #1
Dims
Member
 
Registered: Feb 2009
Posts: 151

Rep: Reputation: 15
How executable refers SO-file?


Does executable file contains the precise path to SO file? Should it be compiled with precise knowing of SO file location?

Or it refers SO file somehow else?
 
Old 08-13-2010, 03:57 PM   #2
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,686
Blog Entries: 23

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Hi,

Ok, let's face it, your question is vague...perhaps due to the nature of the subject, I think.

SO files are drivers, they are needed by executable files, that have BIN as extension. Let's take an example, the java plugin is a file that is called "libjaveplugin_oji.so" and is needed by firefox.bin to run java.

Hope to have helped...eventually...

Thor
 
Old 08-13-2010, 05:01 PM   #3
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by Dims View Post
Does executable file contains the precise path to SO file?
You can control that at link time.

Quote:
Should it be compiled with precise knowing of SO file location?
That depends on how you want to use the executable. Typically not. Typically you want the environment at load time to determine search rules for the .so files.

Quote:
Or it refers SO file somehow else?
There are a few search methods. I forget the details of most of the search methods. The simplest to understand and manipulate is the LD_LIBRARY_PATH environment variable.

You can use the ldd command to find out what name, including path if any, is stored for each .so in the executable and what full path the ldd program thinks that resolves to in the current environment.

Last edited by johnsfine; 08-13-2010 at 05:02 PM.
 
1 members found this post helpful.
Old 08-16-2010, 05:55 AM   #4
Dims
Member
 
Registered: Feb 2009
Posts: 151

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by johnsfine View Post
You can use the ldd command to find out what name, including path if any, is stored for each .so in the executable and what full path the ldd program thinks that resolves to in the current environment.
So, if ldd reports .so file with no path, then it means that automatic search should be activated at load time? Or it means current directory?
 
Old 08-16-2010, 07:21 AM   #5
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
It means search. It does not mean current directory. Linux does not automatically include the current directory when searching for a shared object.

ldd reports both the name as stored and the full path of the file (if any) found by the search.
 
Old 08-17-2010, 03:54 AM   #6
Dims
Member
 
Registered: Feb 2009
Posts: 151

Original Poster
Rep: Reputation: 15
Thank you, uderstood.
 
Old 08-17-2010, 04:32 AM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
The thread has been answered above so I'll skip that. I'll only add...

Quote:
Originally Posted by linusr@flanders View Post
SO files are drivers,
Define "driver". Generally, a "driver" is a piece of software (a program if you wish) that lets your OS and the rest of the programs interact with a hardware device, or some other kind of device (even virtual ones). In any case, it's a software that's often close to the kernel of your OS.

.so files are what 'so' stands for: "shared object" files. They contain libraries of code that can be reused by any other program. They are not device drivers (that'd be '.ko' files, which are kernel modules).

Quote:
they are needed by executable files, that have BIN as extension.
In *nix, the so-called 'executable files' do not have any particular extension. POSIX based OSes and fs's support a +x attribute which is what defines whether a given file is executable or not.
 
Old 08-17-2010, 06:32 AM   #8
Dims
Member
 
Registered: Feb 2009
Posts: 151

Original Poster
Rep: Reputation: 15
I am considering .so files as equivalent to MS Windows' DLLs...
 
Old 08-17-2010, 06:59 AM   #9
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
Basically, in concept. The implementations are quite different though. You can start here:

http://xenophilia.org/winvunix.html

Google might give you some interesting results if you search for "dll vs. so" or " dll vs. shared object"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How would I convert an arbitrary binary file into a Linux executable file? ootawata Programming 8 02-22-2010 12:21 AM
Wrote spec file, installed RPM, binary gives relocation error and refers to build dir hollywoodb Red Hat 2 05-19-2007 11:27 AM
Is mount refers to setting under some file system ... nilathinesh Linux - Newbie 8 12-21-2006 08:57 AM
Howto convert bin file to a executable DOS file lilzz Linux - Newbie 5 08-04-2006 01:03 AM
Linux Executable File Help (created from a .c file) MattG1981 Linux - Newbie 7 06-06-2004 05:54 PM


All times are GMT -5. The time now is 10:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration