Avoiding problems at linktime (part 4 in series)
By Darryl Gove-Oracle on Jun 01, 2011
Part 4 in the series on best practices for linking is available. The key takeaways are:
- Avoid defining duplicate symbols. The Solaris tool lari will produce a report on this issue (besides doing a bundle of other stuff). The problem with multiple definitions of symbols is that it is not predictable which definition will be picked at runtime. This is often deterministic on a particular platform, but could change on a different platform.
- Always define libraries as a hierarchy, with no circular dependencies. If there are circular dependencies the libraries may get loaded in an unpredictable order.