[xorg-bugzilla-noise] [Bug 400] The dlopen() loader fails due to
circular dependancies between modules.
bugzilla-daemon at pdx.freedesktop.org
bugzilla-daemon at pdx.freedesktop.org
Mon Jun 7 16:26:16 PDT 2004
Please do not reply to this email: if you want to comment on the bug, go to
the URL shown below and enter your comments there.
http://freedesktop.org/bugzilla/show_bug.cgi?id=400
ajax at nwnk.net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ajax at nwnk.net
------- Additional Comments From ajax at nwnk.net 2004-06-08 09:26 -------
i've been doing similar work fixing up the ati driver to work with the dlopen
loader:
http://freedesktop.org/~ajax/
basically, drivers just love accessing data in other modules directly. that's a
bad thing. with libdl, symbolic data references have to be resolvable at
dlopen() time - unlike functions, which can be redirected to the linker and thus
resolved lazily.
usually this is a cry for refactoring; global variables are bad. in libati i've
fixed this by one of two methods:
- move the functionality into a function inside the appropriate module (preferred)
- wrap the variable in an accessor function (ugly)
with those changes i can launch X, using only the libdl loader, on linux/x86,
and without special link-time tricks. as an added bonus the code functions
identically between loaders, so it'll still work with the old loader if you
really want to.
alternatively you can tag the offending variables as weak references, but that's
a portability nightmare i'd just as soon avoid.
which i suppose means i'm volunteering to fix this. patches to follow shortly.
--
Configure bugmail: http://freedesktop.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the xorg-bugzilla-noise
mailing list