• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/libva


Commit MetaInfo

修订版74047bc1f83071598132e5714a0199fbdee70b5e (tree)
时间2009-06-04 00:14:46
作者Austin Yuan <shengquan.yuan@inte...>
CommiterAustin Yuan

Log Message

Remove uncessary link form libva.so by adding flag RTLD_NODELETE into
dlopen

Here is the background of this fix
Investigation indicates MRST Moblin Alpha1 0529 and 0520 uses the same libva source package
(which is from graphics Alpha1.4 pakcage
\\mid-depot.amr.corp.intel.com\Exchange\Moblin2\PackageSubmit\1.0.7_05142009-4_Alpha1.4),
and the rootcause is that the linkage of libva dependence libraries is
chaned in 0529 build. I am not sure why 0529 build has this change, and this
change indeed causes libva application segment fault issue.

See the detailed investigation and explanation in the attached
libva-0520-vs-0529.PNG picture.

Reproduce Steps(steps,current result, reproduce possibility)


(1) boot 0529 build
(2) Install libva testsuits into 0529 build
(3) run "mpeg4vld -x -i /var/clips/demo.m4v"

Expected result:


libVA application should exit cleanly

Possible root cause:


There was a global change which helps reduce unnecessary linking
utilizing a
feature in binutils. We could opt liva out of this easily, however I
would
recommend fixing the package to do the right linking instead of relying
on the
tools to do so, Arjan, any suggestions?

Anas


summary of the picture:

the "new" libva does no longer link to

* libXv

* libdrm

* librt

* libpthread

HOWEVER; libva doesn't USE any of these! I don't see how not linking to
these could lead to a crash, since they truely are not used.


Basically it is a known issue. If we remove these library link from
libVA, we will always get a segment fault when XCloseDisplay is called in
application.
Libva doesn't use these liXv/libdrm libraries, but libVA will dlopen HW
specific driver, and the driver links with these libXv/libdrm libraries.
We found the issue can be worked around by adding the link into libVA.
Using binutil to remove unnecessary link makes sense for most of libraries,
but for libva, it disables our workaround.

Austin

Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>

更改概述

差异

--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -27,7 +27,7 @@ INCLUDES = \
2727 libva_la_LTLIBRARIES = libva.la
2828 libva_ladir = $(libdir)
2929 libva_la_LDFLAGS = -version-number 0:30:0 -no-undefined
30-libva_la_LIBADD = $(LIBVA_LIBS) -ldl -ldrm -lX11 -lXext -lXv X11/libva_X11.la
30+libva_la_LIBADD = $(LIBVA_LIBS) -ldl -lX11 -lXext X11/libva_X11.la
3131 CFLAGS = -ansi -O2
3232
3333 nodist_libva_la_SOURCES = va_version.h
--- a/src/va.c
+++ b/src/va.c
@@ -150,7 +150,7 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
150150
151151 va_infoMessage("Trying to open %s\n", driver_path);
152152
153- handle = dlopen( driver_path, RTLD_NOW | RTLD_GLOBAL );
153+ handle = dlopen( driver_path, RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE );
154154 if (!handle)
155155 {
156156 /* Don't give errors for non-existing files */