This is the mail archive of the
mailing list for the binutils project.
Re: Option -static
On Thu, 7 Jan 2010, Jakub Jelinek wrote:
> You can use -Bstatic -la -lb -ld -Bdynamic -le
> to link liba.a, libb.b, libd.a and libe.so (or libe.a if libe.a doesn't
You are right, in my example, but in general that means that you have
specific knowledge of which libs are static and which are in dynamic form
in the system.
I was thinking over a more wide approach where a certain lib doesnt not
exists on static form and of course you would still want the final linking to
take place right? In such a scenario if the ld decides by itself to use
what is available (prinitng a warning) violating the -static option seems
to me not that much wrong.
Anyway if thats the case withthe out of the box gnu ld maybe gold hould
stick with it too.