On Wed, 2003-08-20 at 09:38, Ian Romanick wrote:
> Brian Paul wrote:
> > Ian Romanick wrote:
> >
> >> Currently, the only functions that are aliased like this are both
> >> GLX_SGI_make_current_read functions, a few GLX_SGIX_fbconfig
> >> functions, and glXGetCurrentDisplayEXT (from GLX_EXT_import_context
> >> and GLX 1.2). Since this last function has been supported for so long
> >> in XFree86, it's the only one that I'm at all concerned about. In the
> >> future, some of the pbuffers functions may get the same treatment.
> >
> > I guess I'd like to keep the existing "real" GLX extension functions
> > whenever possible. Some apps/libs (like some varients of GLUT) have
> > direct calls to some GLX functions like glXGetFBConfigAttribSGIX(). If
> > those functions don't exist in libGL people may have problems. I see
> > some reports of this kind of problem with NVIDIA's libGL and older
> > copies of GLUT as-is.
>
> I was afraid of that. I really don't want to have a bunch of gunk
> floating around in either the source or the binary. Would it be okay to
> use --defsym to have the linker do the aliasing? From the ld man page:
>
> --defsym symbol=expression
> Create a global symbol in the output file, containing
> the absolute address given by expression. You may use
> this option as many times as necessary to define mul-
> tiple symbols in the command line. A limited form of
> arithmetic is supported for the expression in this
> context: you may give a hexadecimal constant or the
> name of an existing symbol, or use "+" and "-" to add
> or subtract hexadecimal constants or symbols. If you
> need more elaborate expressions, consider using the
> linker command language from a script. Note: there
> should be no white space between symbol, the equals
> sign (``=''), and expression.
>
> We could add something like the following to the command-line to get the
> same effect as the aliasing in the GLX_functions table:
>
> --defsym glXMakeCurrentReadSGI=glXMakeContextCurrent \
> --defsym glXGetCurrentReadDrawableSGI=glXGetCurrentReadDrawable \
> --defsym glXGetCurrentDisplayEXT=glXGetCurrentDisplay \
> --defsym glXGetFBConfigAttribSGIX=glXGetFBConfigAttrib \
> --defsym glXChooseFBConfigSGIX=glXChooseFBConfig \
> --defsym glXGetVisualFromFBConfigSGIX=glXGetVisualFromFBConfig
>
> That would work, but would it be acceptable?
Or use
static void bar(int) __attribute__ ((alias("foo")));
?
gcc-specific, but probably not worse than doing it with ld.
--
Eric Anholt [EMAIL PROTECTED]
http://people.freebsd.org/~anholt/ [EMAIL PROTECTED]
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel