poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Symbols export control in libpoke


From: Jose E. Marchesi
Subject: Symbols export control in libpoke
Date: Sun, 25 Oct 2020 11:47:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi people!

Right now we control which symbols get exported in libpoke by annotating
function declarations with the "hidden" attribute, like in:

  pkl_compiler pkl_new (pvm vm, const char *rt_path)
    __attribute__ ((visibility ("hidden")));

This works, but it is cumbersome to maintain and also error-prone: it is
easy to forget to annotate new functions.

Some time ago Tim Ruehsen suggested to use a different strategy: to pass
a flag to GCC so it marks all symbols to have hidden visibility by
default, and then to annotate the function declarations in
libpoke/libpoke.h.

I think the later approach is preferable.
Opinions?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]