ws/i965: add butt-ugly linker hack
authorKeith Whitwell <keithw@vmware.com>
Wed, 4 Nov 2009 13:59:59 +0000 (13:59 +0000)
committerKeith Whitwell <keithw@vmware.com>
Wed, 4 Nov 2009 13:59:59 +0000 (13:59 +0000)
Need more linker magic to keep the glX symbols externally visible even
though they started off in a .a file.

src/gallium/winsys/drm/i965/xlib/xlib_i965.c

index 60ab8e1993a1c0537eb5dd158ffa1c22c3d8da62..c55ba6b51994c147b9da02cc13559a2401502229 100644 (file)
@@ -360,3 +360,18 @@ struct xm_driver xlib_i965_driver =
 };
 
 
+
+
+
+/***********************************************************************
+ *
+ * Butt-ugly hack to convince the linker not to throw away public GL
+ * symbols (they are all referenced from getprocaddress, I guess).
+ */
+extern void (*linker_foo(const unsigned char *procName))();
+extern void (*glXGetProcAddress(const unsigned char *procName))();
+
+extern void (*linker_foo(const unsigned char *procName))()
+{
+   return glXGetProcAddress(procName);
+}