linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Markus Rechberger" <mrechberger@gmail.com>
To: Glynn Clements <glynn@gclements.plus.com>
Cc: Shriramana Sharma <samjnaa@gmail.com>,
	Linux C Programming List <linux-c-programming@vger.kernel.org>
Subject: Re: How to write apps dependent on external libraries?
Date: Fri, 14 Jul 2006 12:32:09 +0200	[thread overview]
Message-ID: <d9def9db0607140332jb349136k13dc3107f2766325@mail.gmail.com> (raw)
In-Reply-To: <17590.58653.143536.23451@cerise.gclements.plus.com>

Hey,

Ulrich Drepper has written quite alot about shared libraries. He also
did some performance tests uppon that topic.

* http://people.redhat.com/drepper/ (look at papers)
* http://udrepper.livejournal.com/

think it's better to read his papers first, bet noone will explain it
that accuratly here.

Markus

On 7/14/06, Glynn Clements <glynn@gclements.plus.com> wrote:
>
> Shriramana Sharma wrote:
>
> > Often I see apps which are dependent on this .so file or that. I don't know
> > how apps can be written that depend on libraries that are not linked into the
> > executable. So far I have been linking all needed libraries into the
> > executable.
> >
> > A .so is a collection of what?
>
> A .so (shared object) is structurally quite similar to a single .o
> file. The difference is that a .so is meant to be able to be linked at
> run-time.
>
> Linking against a .so file doesn't copy the code/data from the .o file
> to the executable; it just stores references to the .so file in the
> executable.
>
> The loader (ld-linux.so) will load any shared libraries which the
> executable requires when the executable is loaded. If it can't find
> one or more libraries, you get an error when you try to run the
> executable.
>
> > An .a is a collection of .o-s, right?
>
> It can be a collection of anything (a .a file is just an archive,
> similar to a .zip file), but it's usually just a collection of .o
> files.
>
> Linking against a .a file is similar to linking against the individual
> .o files which it contains, except that only those .o files which
> supply a required symbol (function, variable) are used.
>
> > What is a .la?
>
> A .la file is a metadata file created and used by libtool. It contains
> information (e.g. dependencies) which libtool needs to link against a
> static library.
>
> --
> Glynn Clements <glynn@gclements.plus.com>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


-- 
Markus Rechberger

      reply	other threads:[~2006-07-14 10:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-13 16:04 How to write apps dependent on external libraries? Shriramana Sharma
2006-07-13 16:13 ` Mihai Dontu
2006-07-13 16:40 ` Steve Graegert
2006-07-14  0:28 ` Glynn Clements
2006-07-14 10:32   ` Markus Rechberger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d9def9db0607140332jb349136k13dc3107f2766325@mail.gmail.com \
    --to=mrechberger@gmail.com \
    --cc=glynn@gclements.plus.com \
    --cc=linux-c-programming@vger.kernel.org \
    --cc=samjnaa@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).