I'm not sure what distinction you're drawing
between Unix linkers, and ELF linkers. The first
ELF linkers were all on SYSVr4 derived Unix. There
are of course other unix formats (a.out, coff, ecoff, ...),
but it's been awhile since they were dominant.
Speaking of ELF generally, I think that any object that
doesn't specify all of its dependencies is broken. A well
formed library has full symbol closure --- every symbol
is resolved by the object itself, or by a direct dependency
(DT_NEEDED), or for libraries possibly from the parent
object. Indirect dependencies (dependencies of dependencies)
don't count --- those scenarios are common, and can be made
to work, but those objects are not well formed, and are just
getting "lucky", by intent, or otherwise.
The ELF Forefathers made a mistake (my opinion) in making
full closure only the default for executables, but not for
libraries, and and this encouraged a practice of creating
incomplete libraries, so it's pretty common, and unlikely
to go away fully. I don't think the benefits of full
closure are well understood generally, and programmers
don't give it the attention it deserves.
In Solaris, the core OS is built with -zdefs so that the
libraries we ship do have full closure. Many third parties
we see don't do that, but at least they sit on a solid
foundation.
Anyway, getting down to the actual question, I don't see
an issue with the link-editor trying to pull code out
of an archive to satisfy any outstanding symbol. Archive
extraction is based on unsatisfied references, but the
source of the reference (library, executable, etc) is
not part of the equation. Hence, the behavior you're
asking about seems fine to me --- that's how it's
supposed to work, for better or worse. It's much
too late to change that now, even if one wanted to.
Fix the library to have full closure, and you don't
have to care about it.
Different systems evolved differently, and have different
rules. One could debate which is best, but ultimately,
you have to play by house rules. Full symbol closure
makes life simpler everywhere, so I think it's good advice
generally, not just for ELF.
- Ali
> --
> You received this message because you are subscribed to the Google Groups "Generic System V Application Binary Interface" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
generic-abi...@googlegroups.com <mailto:
generic-abi...@googlegroups.com>.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/generic-abi/490a74d0-b286-42e6-8bd0-452f3af926ffn%40googlegroups.com
> <
https://groups.google.com/d/msgid/generic-abi/490a74d0-b286-42e6-8bd0-452f3af926ffn%40googlegroups.com?utm_medium=email&utm_source=footer>.