LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 02: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, 02:57 PM   #2
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
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, 04:01 PM   #3
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
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 04:02 PM.
 
1 members found this post helpful.
Old 08-16-2010, 04: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, 06:21 AM   #5
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
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, 02:54 AM   #6
Dims
Member
 
Registered: Feb 2009
Posts: 151

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

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
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, 05: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, 05:59 AM   #9
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
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



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-21-2010 11:21 PM
Wrote spec file, installed RPM, binary gives relocation error and refers to build dir hollywoodb Red Hat 2 05-19-2007 10:27 AM
Is mount refers to setting under some file system ... nilathinesh Linux - Newbie 8 12-21-2006 07:57 AM
Howto convert bin file to a executable DOS file lilzz Linux - Newbie 5 08-04-2006 12:03 AM
Linux Executable File Help (created from a .c file) MattG1981 Linux - Newbie 7 06-06-2004 04:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:44 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
Open Source Consulting | Domain Registration