Module: Mesa
Branch: master
Commit: a75baba2f14a2bcdaf640aeef86d67b41bb2a76f
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a75baba2f14a2bcdaf640aeef86d67b41bb2a76f

Author: Emil Velikov <[email protected]>
Date:   Fri May  2 22:02:15 2014 +0100

targets/xa: limit the amount of exported symbols

In the presence of LLVM the final library exports every symbol from
the llvm namespace. Resolve this by using a version script (w/o the
version/name tag).

Considering that there are only ~35 symbols, explicitly list them
to minimize the chances of rogue symbols sneaking in.

v2: Conditionally include the version-script.

Reviewed-by: Thomas Hellstrom <[email protected]> (v1)
Signed-off-by: Emil Velikov <[email protected]>

---

 src/gallium/targets/xa/Makefile.am |    5 +++++
 src/gallium/targets/xa/xa.sym      |   38 ++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/src/gallium/targets/xa/Makefile.am 
b/src/gallium/targets/xa/Makefile.am
index 0d39454..cb9fdc4 100644
--- a/src/gallium/targets/xa/Makefile.am
+++ b/src/gallium/targets/xa/Makefile.am
@@ -66,6 +66,11 @@ libxatracker_la_LDFLAGS = \
        $(GC_SECTIONS) \
        $(LD_NO_UNDEFINED)
 
+if HAVE_LD_VERSION_SCRIPT
+libxatracker_la_LDFLAGS += \
+       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/xa/xa.sym
+endif
+
 if HAVE_MESA_LLVM
 libxatracker_la_LIBADD += $(LLVM_LIBS)
 libxatracker_la_LDFLAGS += $(LLVM_LDFLAGS)
diff --git a/src/gallium/targets/xa/xa.sym b/src/gallium/targets/xa/xa.sym
new file mode 100644
index 0000000..9c7f422
--- /dev/null
+++ b/src/gallium/targets/xa/xa.sym
@@ -0,0 +1,38 @@
+{
+       global:
+               xa_composite_allocation;
+               xa_composite_check_accelerated;
+               xa_composite_done;
+               xa_composite_prepare;
+               xa_composite_rect;
+               xa_context_create;
+               xa_context_default;
+               xa_context_destroy;
+               xa_context_flush;
+               xa_copy;
+               xa_copy_done;
+               xa_copy_prepare;
+               xa_fence_get;
+               xa_fence_wait;
+               xa_fence_destroy;
+               xa_format_check_supported;
+               xa_solid;
+               xa_solid_done;
+               xa_solid_prepare;
+               xa_surface_create;
+               xa_surface_dma;
+               xa_surface_format;
+               xa_surface_from_handle;
+               xa_surface_handle;
+               xa_surface_map;
+               xa_surface_redefine;
+               xa_surface_ref;
+               xa_surface_unmap;
+               xa_surface_unref;
+               xa_tracker_create;
+               xa_tracker_destroy;
+               xa_tracker_version;
+               xa_yuv_planar_blit;
+       local:
+               *;
+};

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to