[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: --as-needed linker option (was Re: binary-without-manpage)



2008/8/22 Bas Wijnen <wijnen@debian.org>:
> --as-needed will let the linker throw away all symbols that aren't used.
> It always does this when linking static libraries.  That's why with
> those, it's important that they're in the right order.  The same is true
> when using --as-needed.  The order should be such, that all used symbols
> from a library must be used by files which are mentioned before (so they
> are undefined references when the library gets linked).  This means your
> source file must be before all libraries (not after them, as it is now),
> and libararies which depend on each other must be in the correct order
> as well[1].

Thanks for the explanation. I couldn't see how to get jam to put the
libraries in the correct order, so I have fixed it by hard-coding the
libraries in Debian/rules.

Any suggestions for making this less hackish are welcome.

I'll put the RFS in a separate post.

Regards

Jeff


Reply to: