[PATCH xserver] sdksyms: Tighten up the symbols we add to the magic table

Jon Turney jon.turney at dronecode.org.uk
Wed Mar 8 17:44:17 UTC 2017


On 06/03/2017 22:20, Adam Jackson wrote:
> On Mon, 2017-03-06 at 18:23 +0000, Jon Turney wrote:
>
>> Unfortunately, one of the possible definitions of _X_EXPORT in
>> Xfuncproto.h is empty, in which case, this leaves us with nothing in
>> sdksyms.c
>
> Though this be true, I'm not sure how it can matter. We only build
> xfree86 on systems where _X_EXPORT expands to something non-empty. And

It has been possible to build an xfree86 server for Cygwin since this 
[1] patchset.

This might even turn out to be useful, if the idea of removing Xephyr, 
Xnest and Xvfb servers [2], to be replaced by invoking the Xorg server 
with the xf86-video-dummy or xf86-video-nested drivers, ever happens.

[1] https://lists.x.org/archives/xorg-devel/2012-April/030281.html
[2] https://lists.x.org/archives/xorg-devel/2012-March/030059.html

> we rely on it expanding to something non-empty because we build the
> rest of the server with hidden visibility, so we need a positive way to
> declare that a symbol is exported; if the system does not have this
> facility, then the server isn't going to export the correct set of
> symbols to the drivers anyway.

Well, that's not absolutely essential, I mean, sdksyms just ensures that 
symbols we want to export are actually referenced and so present in Xorg.

But yeah, at the moment _X_EXPORT expands to nothing and 
-Wl,--export-all is used on Cygwin, which is wrong, strictly speaking, 
as that makes it possible to build a driver which uses a symbol it 
shouldn't.

So, I guess I need to look at doing this properly with 
__attribute__((dllexport|dllimport)).



More information about the xorg-devel mailing list