delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-apps-help AT cygwin DOT com; run by ezmlm |
Sender: | cygwin-apps-owner AT cygwin DOT com |
List-Subscribe: | <mailto:cygwin-apps-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin-apps/> |
List-Post: | <mailto:cygwin-apps AT cygwin DOT com> |
List-Help: | <mailto:cygwin-apps-help AT cygwin DOT com>, <http://sources.redhat.com/lists.html#faqs> |
Mail-Followup-To: | cygwin-apps AT cygwin DOT com |
Delivered-To: | mailing list cygwin-apps AT cygwin DOT com |
From: | "Ralf Habacker" <Ralf DOT Habacker AT freenet DOT de> |
To: | "Cygwin-Apps" <cygwin-apps AT cygwin DOT com> |
Subject: | RE: FW: libtool devel package still dll crippled. |
Date: | Fri, 19 Apr 2002 09:31:11 +0200 |
Message-ID: | <005e01c1e774$2dab05d0$651c440a@BRAMSCHE> |
MIME-Version: | 1.0 |
X-Priority: | 3 (Normal) |
X-MSMail-Priority: | Normal |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4133.2400 |
Importance: | Normal |
In-Reply-To: | <200204181338.42655.bastian@kde.org> |
> > 1. When someone build a shared lib on linux and uses a static lib, are the > > symbols of the static lib automatically exported ? > > Yes, using a static lib is no different than compiling that code > directly into your codebase. Thats the behavior we have on cygwin, isn't it > > > 2a. If yes, and if someone build a second dll with the same static lib, the > > symbols of the static libs are in both > > shared lib defined. Then if someone uses these two shared libs to build for > > example an application, ld fails with duplicated symbol errors. How does ld > > prevent this ? > > ld checks the symbols in the shared libs during compile time to see if it can > resolve all symbols and appearantly also detects duplicated symbols. On Linux > it is not necassery impossible to have two libs that define the same symbols. > E.g. this feature can be used to override the malloc implementation of libc. > Of course when this happens inadvertently it can lead to unexpected > behaviour/crashes. ELF (The linking format used on Linux) has rather complex > rules for determining which symbol should be used if it is defined multiple > times. It also distinguishes between weak and strong symbols. It might be > that it is only possible to override weak-symbols and that multiple > strong-symbols result in link-errors. Does the cygwin ld has some similar rules ?
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |