[RFC PATCH 0/15] no-undefined linking for Xorg & drivers on Solaris

Alan Coopersmith alan.coopersmith at oracle.com
Fri May 25 08:02:04 PDT 2012


This patch series makes use of a upcoming feature in the Solaris linker
that resolves symbols against a "parent" binary that is expected to load
a module as a loadable plugin, as Xorg does with driver & extension modules
today.  This builds upon, and requires, the recent Cygwin work to build Xorg
in a similar fashion with their requirements for finding all symbols at link
time.

It modifies all the modules that come with the Xorg server and a selection
of common drivers to link cleanly & completely with no undefined symbols.

However, as you can see there's a lot of links from the drivers back to
random loadable extension modules in the current server layout (fb, shadow,
int10, extmod, dri2, etc.) - this would get a lot simpler and change less
if Daniel's proposed de-loadable-modularization of the core server landed
first, so those symbols were all found simply in the Xorg binary instead
of spread across twenty .so files - are we considering that for landing in
the 1.13 server cycle?

As previously noted, I've been using a variation of this, using generated
linker mapfiles listing all the exported symbols instead of the new -parent
flag, for building Xorg on Solaris for years, and it has saved us a few times
from shipping binaries to our users that might call non-existent functions
and thus crash at runtime, by instead catching those failures at build time.

xserver (4):
  shadowfb calls GetGlyphs() so list libXfont as a dependency
  Build tda9885.c functions into fi1236 to avoid libtool relinking
    problems
  Add pixman to module dependencies for pixman_region_* functions
  Enable no-undefined symbols mode in Solaris builds if -z parent is in
    ld

 configure.ac                    |   22 ++++++++++++++++++++--
 hw/xfree86/Makefile.am          |    6 +++---
 hw/xfree86/dri/Makefile.am      |    2 +-
 hw/xfree86/dri2/Makefile.am     |    2 +-
 hw/xfree86/i2c/Makefile.am      |    5 +----
 hw/xfree86/shadowfb/Makefile.am |    2 +-
 hw/xfree86/xaa/Makefile.am      |    3 ++-
 7 files changed, 29 insertions(+), 13 deletions(-)

Drivers:
  xf86-input-keyboard: Link with modules needed to build with no-undefined linking
  xf86-input-mouse: Link with modules needed to build with no-undefined linking
  xf86-input-void: Link with modules needed to build with no-undefined linking
  xf86-video-ast: Link with modules needed to build with no-undefined linking
  xf86-video-ati: Link with modules needed to build with no-undefined linking
  xf86-video-dummy: Link with modules needed to build with no-undefined linking
  xf86-video-intel: Link with modules needed to build with no-undefined linking
  xf86-video-mach64: Link with modules needed to build with no-undefined linking
  xf86-video-mga: Link with modules needed to build with no-undefined linking
  xf86-video-modesetting: Link with modules needed to build with no-undefined linking
  xf86-video-vesa: Link with modules needed to build with no-undefined linking
-- 
1.7.9.2



More information about the xorg-devel mailing list