From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 25 Mar 2010 01:01:50 +0300 From: "Dmitry V. Levin" To: ALT Linux Team development discussions Message-ID: <20100324220150.GA31796@wo.int.altlinux.org> Mail-Followup-To: ALT Linux Team development discussions References: <20100321153442.GA21854@wo.int.altlinux.org> <20100321191834.GE30094@altlinux.org> <201003221023.34323.serpiph@nikiet.ru> <20100322082301.GB12770@altlinux.org> <20100324180448.GH21538@wo.int.altlinux.org> <20100324182459.GJ8193@altlinux.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YZ5djTAD1cGYuMQK" Content-Disposition: inline In-Reply-To: X-fingerprint: FE4C 93AB E19A 2E4C CB5D 3E4E 7CAB E6AC 9E35 361E Subject: Re: [devel] Q: --no-copy-dt-needed-entries X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Mar 2010 22:01:51 -0000 Archived-At: List-Archive: List-Post: --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 24, 2010 at 09:01:51PM +0200, Kirill A. Shutemov wrote: > 2010/3/24 Alexey Tourbin : > > On Wed, Mar 24, 2010 at 09:04:48PM +0300, Dmitry V. Levin wrote: > >> On Mon, Mar 22, 2010 at 11:23:01AM +0300, Alexey Tourbin wrote: [...] > >> > Just don't do it - in conjunction with --as-needed, --copy-dt-needed= -entries > >> > is good by default. > >> > >> Current --as-needed + --copy-dt-needed-entries combination works pretty > >> well, so let's delay changing this default until we face a real bug. > > > > Not only does it work pretty well, it also tries to do "the right > > thing". =A0In a previous message, I tried to describe two distinct ld > > modes: dumb mode and smart mode. =A0Dumb mode would just do what is > > specified on the command line. =A0By contrast, smart mode could do > > something more about shared library dependencies based on how symbols > > are resolved. > > > > Now, a smart mode, what could that be? =A0It's about either extra > > dependencies which are unused (--as-needed), or missing/implicit > > dependencies which can be obtained automatically (--copy-dt-needed-entr= ies). > > So, if there's anything like a smart mode, these two options togehter > > are pretty smart. >=20 > Ok, for example, we have package libfoo with library libfoo.so.0 which > links with libm. Program bar uses symbols from both libfoo and libm, > but it links only with libfoo.so.0. Everything works fine. Then libfoo > changes a bit. It doesn't link with libm any more, but soname hasn't > changed. Everything still works fine, but building of program bar is > broken. Note that, as you've just said, runtime still works fine, and there are no wrong linkage. > Cause of breakage is not clean in this situation. Do we care > about situations like this? Well, if it just no longer links due to this error, the fix is rather trivial. Why should we bother of fixing these harmless hidden linkage bugs so much? Let's fix them as soon as they arise. > Currently, we have a good chance to fix buggy software. It's always good to fix buggy software. However, there are too many bugs around, let's fix first those that harm most. Fixing linkage bugs uncovered by --no-copy-dt-needed-enties option brings us nothing besides this fix, because the option itself has no other benefits, unlike e.g. --as-needed which was introduced to solve real issue -- overlinking. > --no-copy-dt-needed-enties provides rather informative error message > on underlinking. That's nice. --=20 ldv --YZ5djTAD1cGYuMQK Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkuqi84ACgkQfKvmrJ41Nh4YoQCcD41KfDK/RxW2gbJhr8cIiEJm SYoAoKixPmvAzU4nBJcY6WFRkuGuBOL1 =ux0x -----END PGP SIGNATURE----- --YZ5djTAD1cGYuMQK--