p11_kit_fini / p11_kit_init - Should these be public symbols?
stefw at redhat.com
Tue Mar 19 05:16:06 PDT 2013
On 03/17/2013 04:02 PM, Andreas Metzler wrote:
> On 2013-03-09 Andreas Metzler <ametzler at downhill.at.eu.org> wrote:
>> 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.)
> FWIW I have uploaded 0.16.4 with the attached patch to
Thanks. I checked with the following command, and
constructors/destructors do seem to work regardless of being exported:
P11_KIT_DEBUG=all LD_PRELOAD=p11-kit/.libs/libp11-kit.so gedit
More information about the p11-glue