dependency list for static libraries
Howard Chu
hyc@symas.com
Tue Sep 19 15:49:00 GMT 2017
We often get link errors when switching from dynamic linking to static
linking, because dynamic libraries list all of their own dependency libraries,
and static libraries don't. (And the program being linked doesn't know about
those indirect dependencies.)
It Would Be Nice if we could add a dependency list to a static library too.
Much like ranlib creates an index for a static library already, store the list
of dependencies in a reserved module.
It seems to me I've made this suggestion before but Google and my memory have
failed to locate it. We'd need either a new tool like ranlib, or a new flag to
ar to store a list of dependencies, and then linker support to lookup the
dependency list whenever referencing a static library.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
More information about the Binutils
mailing list