Date: Tue, 06 Dec 2011 23:41:34 +0200 From: Andriy Gapon <avg@FreeBSD.org> To: Martin Matuska <mm@FreeBSD.org> Cc: FreeBSD current <freebsd-current@FreeBSD.org>, FreeBSD Ports <freebsd-ports@FreeBSD.org> Subject: Re: binutils-2.22: ld and --copy-dt-needed-entries Message-ID: <4EDE8C0E.7050806@FreeBSD.org> In-Reply-To: <4EDE8816.7030505@FreeBSD.org> References: <4EDE474C.8090600@FreeBSD.org> <4EDE8816.7030505@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
on 06/12/2011 23:24 Martin Matuska said the following: > On 6.12.2011 17:48, Andriy Gapon wrote: >> Just for your information. >> It seems that ld from binutils-2.22 by default has --no-copy-dt-needed-entries >> behavior, and so explicit --copy-dt-needed-entries is now needed where the >> previous default behavior is relied upon. >> >> A short excerpt from the man page for your convenience: >> >>> This option also has an effect on the resolution of symbols in >>> dynamic libraries. With --copy-dt-needed-entries dynamic libraries >>> mentioned on the command line will be recursively searched, >>> following their DT_NEEDED tags to other libraries, in order to >>> resolve symbols required by the output binary. With the default >>> setting however the searching of dynamic libraries that follow it >>> will stop with the dynamic library itself. No DT_NEEDED links will >>> be traversed to resolve symbols. > What do we do with this? > We can go back, patch to behave as before or to continue. > Are there any serious complaints? I am not sure. Eventually all upstreams of our ports will have to deal with this. So far I've encountered only one problematic port (gegl) that links a binary with -lglib-2.0 expecting that a required -liconv dependency would be automatically picked up via DT_NEEDED. libglib-2.0.so indeed has a DT_NEEDED entry for libiconv.so. But this dependency is not explicitly advertised via pkg-config metadata: $ fgrep -i Libs /usr/local/libdata/pkgconfig/glib-2.0.pc Libs: -L${libdir} -lglib-2.0 Libs.private: -liconv So there could be other issues related to this in the future. Perhaps this is actually an issue with glib, maybe it should have -liconv in Libs. I am not really knowledgeable about his stuff. -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EDE8C0E.7050806>