[oe] shared libraries RPATH causes overhead

Koen Kooi koen at dominion.kabel.utwente.nl
Thu Apr 26 15:05:48 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Leon Woestenberg schreef:
> [resent, seems to be queued or lost earlier]
> 
> Hello,
> 
> During an strace run on my target, I noticed a considerable amount of
> attempts to load shared libraries from their RPATH location (which is
> the preferred location over what the linker thinks).
> 
> objdump -x libfontconfig.so.1  | grep RPATH
> /home/leon/sandbox/e520/openembedded/build/tmp/staging/i686-angstrom-linux/lib
> 
> This results in considerable overhead during loading of shared libraries.
> 
> Koen secretly told me that there had been a masterplan amongst those
> who may call themselves core developer to fix these paths.
> 
> I'm curious about what the fix would incur.

I don't have a fix, but insane.bbclass can be extended to notice rpath pointing to staging
instead of workdir*:

#
# old_revision [ba162bf6372784bad9177dc8a7fa8a66c9e665c4]
#
# patch "classes/insane.bbclass"
#  from [f04e47e34a23d6b9c9ada6d369e9432d5f400054]
#    to [9eaa617c34be8ac56b997f6c9e464adaad5b9187]
#
============================================================
- --- classes/insane.bbclass      f04e47e34a23d6b9c9ada6d369e9432d5f400054
+++ classes/insane.bbclass      9eaa617c34be8ac56b997f6c9e464adaad5b9187
@@ -202,10 +202,11 @@ def package_qa_check_rpath(file,name,d):
     """
     import bb, os
     scanelf = os.path.join(bb.data.getVar('STAGING_BINDIR_NATIVE',d,True),'scanelf')
- -    bad_dir = bb.data.getVar('TMPDIR', d, True) + "/work"
+    bad_dir_test = bb.data.getVar('TMPDIR', d, True) + "/work"
+    bad_dir = bb.data.getVar('TMPDIR', d, True)
     if not os.path.exists(scanelf):
         bb.fatal("Can not check RPATH scanelf not found")
- -    if not bad_dir in bb.data.getVar('WORKDIR', d, True):
+    if not bad_dir_test in bb.data.getVar('WORKDIR', d, True):
         bb.fatal("This class assumed that WORKDIR is ${TMPDIR}/work... Not doing any check")

     output = os.popen("%s -Byr %s" % (scanelf,file))


regards,

Koen


* assuming staging in inside TMPDIR


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFGML/MMkyGM64RGpERAjY6AJ4qOBp8Rbh2b4O7qqXdvC8AKTMWjgCfVsz8
nQesWgdduLHGFvu6P0I9pOI=
=/Amo
-----END PGP SIGNATURE-----




More information about the Openembedded-devel mailing list