Re: Module versioning

Martin von Loewis (martin@mira.isdn.cs.tu-berlin.de)
Wed, 31 Dec 1997 00:17:34 +0100


> ... which is why I suggested using stabs information to mangle the symbols,
> or otherwiseprovide a means of type-safe linkage. If the types of the
> parameters are the same name and form, and function names are the same,
> and return values are same type form, this would be pretty safe.

Well, you can construct cases... What if the structure contains another
structure, and this structure is changed - maybe you need to consider
arbitrary nesting.

> Note that this is much more picky then C++-style linkage.

Yes, indeed.

> Really, I think this would work, and if I had time I would prove my point.
> (I may yet find the time.)

Don't waste your time: genksyms does exactly that. It detects all
structure definitions and their relationship, and computes a hash
for all structures in the parameter list of an exported function.

Regards,
Martin