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>
Showing
Please register or sign in to comment