Am 05.04.2014 11:47, schrieb Emil Velikov:
On 05/04/14 10:34, Christian König wrote:
Am 05.04.2014 03:46, schrieb Emil Velikov:
Using export-symbols-regex is the least desirable method of restricting
the exported symbols, as is completely messes up with the symbol table.
Why? As far as I can tell it does exactly what it is supposed to do.

Short story "trust me on this one" :) Long story read Ulrich Drepper's paper
http://people.redhat.com/drepper/dsohowto.pdf

Ah! I see, so export-symbols-regex and export-symbols kill the local symbols needed for relocation as well. Indeed that seems to be a rather stupid idea.

Christian.

-Emil

Christian.

Cc: Christian König <christian.koe...@amd.com>
Signed-off-by: Emil Velikov <emil.l.veli...@gmail.com>
---
   src/gallium/Automake.inc                       | 2 +-
   src/gallium/targets/r600/vdpau/Makefile.am     | 2 --
   src/gallium/targets/radeonsi/vdpau/Makefile.am | 2 --
   src/gallium/targets/vdpau-nouveau/Makefile.am  | 2 --
   src/gallium/targets/vdpau.sym                  | 8 ++++++++
   5 files changed, 9 insertions(+), 7 deletions(-)
   create mode 100644 src/gallium/targets/vdpau.sym

diff --git a/src/gallium/Automake.inc b/src/gallium/Automake.inc
index 2fbea6e..b52b34c 100644
--- a/src/gallium/Automake.inc
+++ b/src/gallium/Automake.inc
@@ -63,7 +63,7 @@ GALLIUM_VDPAU_LINKER_FLAGS = \
       -module \
       -no-undefined \
       -version-number $(VDPAU_MAJOR):$(VDPAU_MINOR) \
-    -export-symbols-regex $(VDPAU_EXPORTS) \
+    -Wl,--version-script=$(top_srcdir)/src/gallium/targets/vdpau.sym \
       $(GC_SECTIONS) \
       -Wl,--no-undefined
   diff --git a/src/gallium/targets/r600/vdpau/Makefile.am
b/src/gallium/targets/r600/vdpau/Makefile.am
index 455d90f..b212024 100644
--- a/src/gallium/targets/r600/vdpau/Makefile.am
+++ b/src/gallium/targets/r600/vdpau/Makefile.am
@@ -20,8 +20,6 @@
   # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
   # DEALINGS IN THE SOFTWARE.
   -# Note: Make sure VDPAU_EXPORTS is defined before including Automake.inc
-VDPAU_EXPORTS = '^(vdp_imp_device_create_x11|radeon_drm_winsys_create)$$'
   include $(top_srcdir)/src/gallium/Automake.inc
     AM_CFLAGS = \
diff --git a/src/gallium/targets/radeonsi/vdpau/Makefile.am
b/src/gallium/targets/radeonsi/vdpau/Makefile.am
index b8dcf88..975ae78 100644
--- a/src/gallium/targets/radeonsi/vdpau/Makefile.am
+++ b/src/gallium/targets/radeonsi/vdpau/Makefile.am
@@ -20,8 +20,6 @@
   # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
   # DEALINGS IN THE SOFTWARE.
   -# Note: Make sure VDPAU_EXPORTS is defined before including Automake.inc
-VDPAU_EXPORTS = '^(vdp_imp_device_create_x11|radeon_drm_winsys_create)$$'
   include $(top_srcdir)/src/gallium/Automake.inc
     AM_CFLAGS = \
diff --git a/src/gallium/targets/vdpau-nouveau/Makefile.am
b/src/gallium/targets/vdpau-nouveau/Makefile.am
index de1adf8..36d2f47 100644
--- a/src/gallium/targets/vdpau-nouveau/Makefile.am
+++ b/src/gallium/targets/vdpau-nouveau/Makefile.am
@@ -20,8 +20,6 @@
   # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
   # DEALINGS IN THE SOFTWARE.
   -# Note: Make sure VDPAU_EXPORTS is defined before including Automake.inc
-VDPAU_EXPORTS = '^(vdp_imp_device_create_x11|nouveau_drm_screen_create)$$'
   include $(top_srcdir)/src/gallium/Automake.inc
     AM_CFLAGS = \
diff --git a/src/gallium/targets/vdpau.sym b/src/gallium/targets/vdpau.sym
new file mode 100644
index 0000000..f184193
--- /dev/null
+++ b/src/gallium/targets/vdpau.sym
@@ -0,0 +1,8 @@
+{
+       global:
+               vdp_imp_device_create_x11;
+               nouveau_drm_screen_create;
+               radeon_drm_winsys_create;
+       local:
+               *;
+};

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to