[fedfs-utils] [PATCH 0/3] Proposing fedfs-utils 0.9.2

David Disseldorp ddiss at suse.de
Tue Jun 25 08:25:47 PDT 2013


On Tue, 25 Jun 2013 10:37:01 -0400
Chuck Lever <chuck.lever at oracle.com> wrote:

...
> > I spoke to one of our toolchain team members, he demonstrated that the
> > difference in behaviour is due to openSUSE's use of the --as-needed
> > binutils feature:
> 
> How is that flag specified in your build?  I'd like to try it here.  Out of interest, why is this needed?

It's triggered by the build service using the SUSE_ASNEEDED envirnment
variable, but can be add manually via the -Wl,--as-needed option.

As to why it's needed, the Gentoo documentation does best at describing
how --as-needed can be beneficial:
http://www.gentoo.org/proj/en/qa/asneeded.xml#doc_chap1

> >  Normally the linker will add a DT_NEEDED tag for each dynamic library
> >  mentioned on the command line, regardless of whether the library is
> >  actually needed or not. --as-needed causes a DT_NEEDED tag to only be
> >  emitted for a library that satisfies an undefined symbol reference
> >  from a regular object file or, if the library is not found in the
> >  DT_NEEDED lists of other libraries linked up to that point, an
> >  undefined symbol reference from another dynamic library.
> >  --no-as-needed restores the default behaviour.
> > He also mentioned that the same linker argument ordering requirements
> > would be present if the shared libraries were static libraries instead.
> 
> I don't understand this last comment.  The build already creates convenience libraries which are libfoo.a,  not shared libraries.

E.g. If the libraries proving the libcrypto symbols were static and the
same argument ordering was used, then linking would fail.

> > With this in mind, I stand by my request to have the "fix gcc linker
> > library argument placement" patch considered for upstream inclusion.
> 
> OK, can you update the patch description to focus on the linker issue and describe SuSE's requirement?  Right now this is our only documentation of this issue, so I would prefer it to be helpful and accurate.  ;-)

Sure, understood :). I'll update the description and resend.

Cheers, David



More information about the fedfs-utils-devel mailing list