[devel] Q: --no-copy-dt-needed-entries

Kirill A. Shutemov kirill на shutemov.name
Ср Мар 24 19:01:51 UTC 2010


2010/3/24 Alexey Tourbin <at на altlinux.ru>:
> 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:
>> > On Mon, Mar 22, 2010 at 09:28:11AM +0200, Kirill A. Shutemov wrote:
>> > > Я анонсирую, когда всё будет готово. Нужно решить несколько проблем на
>> > > ARM сперва.
>> >
>> > 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".  In a previous message, I tried to describe two distinct ld
> modes: dumb mode and smart mode.  Dumb mode would just do what is
> specified on the command line.  By 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?  It's about either extra
> dependencies which are unused (--as-needed), or missing/implicit
> dependencies which can be obtained automatically (--copy-dt-needed-entries).
> So, if there's anything like a smart mode, these two options togehter
> are pretty smart.


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. Cause of breakage is not clean in this situation. Do we care
about situations like this?

Currently, we have a good chance to fix buggy software.
--no-copy-dt-needed-enties provides rather informative error message
on underlinking.


Подробная информация о списке рассылки Devel