public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* resolving weak symbols.
@ 2024-03-28 22:58 Tom Kacvinsky
  2024-03-30  1:43 ` Alan Modra
  2024-04-12 16:01 ` Nick Clifton
  0 siblings, 2 replies; 3+ messages in thread
From: Tom Kacvinsky @ 2024-03-28 22:58 UTC (permalink / raw)
  To: Binutils

[-- Attachment #1: Type: text/plain, Size: 428 bytes --]

HI,

Support I have a static archive libfoo.a that has a weak sym, call it quux.

And the link line I have is

gcc -o foo -L. -lfoo -Wl,--as-needed -lbar -lbaz

Where libbar.so and libbaz.so also have the weak symbol quux.

Then the executable foo has a dynamic dependency on both libbar.so _and_
libbaz.so.

Is this expected behavior?  Is there a way of forcing exactly one of
libfoo.so and libbaz.so to be used?

Thanks,

Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-12 16:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-28 22:58 resolving weak symbols Tom Kacvinsky
2024-03-30  1:43 ` Alan Modra
2024-04-12 16:01 ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).