Enforcing server and API in a dlloader world
Egbert Eich
eich at pdx.freedesktop.org
Fri May 27 01:53:00 PDT 2005
Daniel Stone writes:
> On Mon, May 23, 2005 at 12:27:41PM +0200, Egbert Eich wrote:
>
> The only real way to achieve this would be to generate a custom linker
> script from xf86sym.c, which is pretty nasty. I also don't know how
> portable linker scripts are.
>
> Surely the best thing to do would just be to have someone sit down and
> manually mark all the symbols in xf86sym.c, dixsym.c, fontsym.c and
> friends X_VISIBLE (or whatever it is), and then we could build with
> -fvisibility=hidden? This takes us back to the old elfloader
> behaviour, where people were required to manually export symbols. It
> also prevents any 'accidental' exposing of symbols: only the ones
> people want to be visible will be visible.
I'm not interested in having to maintain a custom linker.
However I would like to keep the information about exported symbols
in a *single place*. This can either be done in files like xf86sym.c
and friends or in the function definition. But not in two places
because that would be error prone.
The files like xf86sym.c are still needed for the old module loader
which is deprecated - but have we made the move to drop it entirely?
If we have a way to generate these files on the fly it would be fine.
I would expect that it should be possible to have input files which
could be processed to create both xf86sym.c style output files as
well as linker maps. With visibility tags in the function definition
this would be a little harder.
Furthermore our solution should be portable that means versatile
enough to be used on the majority systems and compilers we support.
Egbert.
More information about the xorg
mailing list