LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-04-2007, 07:30 AM   #1
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Rep: Reputation: 47
The command ldconfig


ldconfig - configure dynamic linker run-time bindings.


ldconfig creates the necessary links and cache (for use by the run-time
linker, ld.so) to the most recent shared libraries found in the direc-
tories specified on the command line, in the file /etc/ld.so.conf, and
in the trusted directories (/usr/lib and /lib). ldconfig checks the
header and file names of the libraries it encounters when determining
which versions should have their links updated. ldconfig ignores sym-
bolic links when scanning for libraries.


What is dynamic linker run-time bindings?
 
Old 10-04-2007, 08:05 AM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
When a program is compiled with dynamic linking enabled, parts of the program which come from libraries are not copied into the executable. Instead they are loaded when the program is run. This is dynamic linking. Dynamic linking allows there to be a single, central copy of commonly used functions, instead of one copy in the executable for each program. This saves disk space, reduces memory usage and helps ease system maintenance (although it does have its own problems).

If you come from a Windows environment, this is what .dll files provide - those parts which can be dynamically loaded at runtime. In Linux these are .so files.

Have a read of the ld.so manual page, which gives an overview.

If you want a lot more detail, have a read about ELF.
 
Old 10-04-2007, 08:49 AM   #3
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
And then there are .a files, which are static. Each software package that you compile will have its own personal copy. In most cases, that just means a waste of space and potential headaches when you would like to do a system-wide upgrade or deal with a bug in a library. You'd have to deal with each software package individually. Dynamic libraries are more convenient because they are the only part that needs to be upgraded (except when you are updating to a new major number of the library in question, which does require a lot more work).
 
Old 10-04-2007, 09:19 AM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
garr, I posted to the wrong thread - please ignore this one.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using ldconfig!! vishamr2000 Fedora 14 04-20-2007 04:10 AM
ldconfig -> "command not found" ayerkblei Linux - General 1 05-10-2006 08:28 PM
where is ldconfig ? trutnev Red Hat 3 06-01-2005 12:05 PM
what does ldconfig do ? rajorshi Slackware 8 09-14-2004 04:19 PM
ldconfig command not found Draylath Linux - Newbie 5 06-23-2004 04:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:19 PM.

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