p11_kit_fini / p11_kit_init - Should these be public symbols?

Andreas Metzler ametzler at downhill.at.eu.org
Sat Mar 9 02:39:23 PST 2013

On 2013-03-09 Stef Walter <stef at thewalter.net> wrote:
> On 09.03.2013 10:13, Andreas Metzler wrote:
>> 0.16 exports two new symbols in libp11-kit.so: p11_kit_fini /
>> p11_kit_init. As there is no corresponding prototype in p11-kit.h I
>> am wondering whether this is done intentionally.

> Yup, these are a library constructor and finalizer when running on Linux
> (with appropriate compiler attributes). They are not meant to be called
> explicitly. Is there a better way to name them?

I am not completely, totally sure but I do not think
constructor/deconstructor need to be exported, making these private
symbols (p11_kit_fini -> _p11_kit_fini / p11_kit_init ->
_p11_kit_init) seems to work for me. Could you please doublecheck and
comment? (I am out of my depth.)

thanks, cu andreas

`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'

More information about the p11-glue mailing list