[Info-vax] linkshrlib.com - link opensource libraries into shareable images
Jose Baars
peutbaars at gmail.com
Fri Aug 3 04:46:31 EDT 2012
Op vrijdag 3 augustus 2012 06:28:14 UTC+2 schreef John Reagan het volgende:
> > Hopefully similar functionality is included in the C and other compilers
>
> > as well.
>
>
>
> The problem with such a feature is that SYMBOL_VECTORs are order dependent.
> If you add a new routine to the middle of your C (or Fortran or Pascal
> or...) module, you want the new PROCEDURE entry to be at the END of the
> symbol vector. Of course, the compiler wouldn't know how to do that. Each
> "automatically generated symbol vector" might have a different order than
> the prior one.
According to the C++ docs, they have at least tried to overcome that, quote:
'Once an options file is created, it should be maintained for input to subsequent compilations. In this way, any new symbols caused by a change in the source will be added to the end of the compilation. Any existing symbols will not be added, as described in the NOTES section above. This technique ensures that the order of symbols remains unchanged, and that future shared libraries are compatible with existing ones.'
Eventually, the decision what to put in a vector options file and in what order,
has to be made by a human, preferably someone knowledgeable.
In linkshrlib.com ordering new vectors is dealt with as well, but in the case of discarded vectors it gives a warning, and it's up to the user to deal with it
it will not generate code to add dummy entry points, private procedures, in such a case.
More information about the Info-vax
mailing list