zsh-workers
 help / color / mirror / code / Atom feed
From: Andrey Borzenkov <arvidjaar@newmail.ru>
To: zsh-workers@sunsite.dk
Subject: Re: Library linkage portability?
Date: Sun, 29 Apr 2007 20:09:24 +0400	[thread overview]
Message-ID: <200704292009.24714.arvidjaar@newmail.ru> (raw)
In-Reply-To: <070429084431.ZM5861@torch.brasslantern.com>

[-- Attachment #1: Type: text/plain, Size: 1892 bytes --]

On Sunday 29 April 2007, Bart Schaefer wrote:
> On Apr 29,  5:34am, Phil Pennock wrote:
> }
> } Can someone please educate me as to the issues, or have I summed it up?
> } What about the stranger platforms, AIX etc?
>
> Search the zsh-workers archives for the years 1996-1998 for the terms
> "dynamic;link" "dynamic;load" and "dynamic;library".  E.g.:
>
>     http://tinyurl.com/3355m6
>
> In particular start here:
>
>     http://tinyurl.com/37gaqe
>
> My recollection is that Cygwin and some other environments require not
> that dynamic modules be linked from the main executable, but that they
> be linked from another library, which is why the zsh/main module exists.
>

More precisely - some systems cannot export dynamic symbols (necessary for 
run-time linking) from main executable; they can be exported only from 
another dynamic module; library just being special case of dynamic module. I 
have been using such system for some time. Because on Win32 you actually link 
DLL against stub for another DLL, and such stub exists for DLL only, not for 
exe, I guess it is true for Cygwin as well (modern Cygwin can generate stub 
on the fly, but it is still required).

Also there are systems that do not support chained libraries (i.e. main 
executable requires library liba.so which requires libb.so. In this case 
libb.so won't be loaded unless explicitly listed during linking of main 
executable. Whether linker does not put NEEDED entries or rtld ignores them, 
does not matter - I believe on my system it was the latter). That is actually 
what gave rise to something like "pkgcofig --libs ..."; also libtool should 
cope with this too - it has full information about all requirements and links 
main executable against all need libraries on systems that need it.

I do not know if you can find any such system in the wild today.

-andrey

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

      reply	other threads:[~2007-04-29 16:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-29 12:34 Phil Pennock
2007-04-29 15:44 ` Bart Schaefer
2007-04-29 16:09   ` Andrey Borzenkov [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=200704292009.24714.arvidjaar@newmail.ru \
    --to=arvidjaar@newmail.ru \
    --cc=zsh-workers@sunsite.dk \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).