LD Changes To Implicit DSO Linking Update

Adam Jackson ajax at redhat.com
Tue Feb 9 14:38:09 UTC 2010


On Tue, 2010-02-09 at 08:06 +0000, Richard Hughes wrote:
> On 8 February 2010 22:46, Kevin Kofler <kevin.kofler at chello.at> wrote:
> > As a result, you'll be causing dozens of FTBFS bugs just before the feature
> > freeze. I think this is entirely the wrong time in the release cycle to do
> > such a change, if it is done at all.
> 
> I've been fixing upstream projects for weeks to build with
> --no-as-needed. The list of projects that fail to build should be much
> smaller now, especially for GNOME and Freedesktop stuff.

Just as a reminder, this change is --no-add-needed, not --no-as-needed.
They have infuriatingly similar names; one of the changes is also to
change the name of --{no-,}add-needed to be more obvious.

--no-as-needed is already the default behaviour, and means "libraries
specified with -lfoo will be emitted into the link output in a DT_NEEDED
entry, regardless of whether any symbols from libfoo are used in the
link output object itself".  This may mean your binary or library ends
up with more dependencies than it needs, but is generally harmless.

--no-add-needed is quite different.  Your binary a.out uses symbols from
libfoo and libbar.  libfoo is linked against libbar.  But your link line
only says -lfoo.  --add-needed behaviour, the old default, would
implicitly add a "-lbar" as well.  --no-add-needed, the new default,
will not, and therefore your link will probably fail.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://lists.fedoraproject.org/pipermail/devel/attachments/20100209/40814b75/attachment.bin 


More information about the devel mailing list