On Tue, Feb 09, 2016 at 05:42:31PM +0100, Clemens Gruber wrote: > On Tue, Feb 09, 2016 at 10:31:22AM +0100, Juergen Borleis wrote: > > <path/to/toolchain>/sysroot-<toolchain-name>/sbin/ldconfig > > Very nice, thank you! After running ldconfig on the target, running strace > with /bin/true shows only one access for /etc/ld.so.preload before using > the /etc/ld.so.cache successfully. That's a major improvement! Nearly 30 > syscalls less, per process :) > > Now I'll just write a little ptxdist rule to call ldconfig once at > initialization (or at every startup? Some distros seem to do that.) > > If I ever want to support running opkg on the target, I should probably > have a mechanism to automatically rerun ldconfig in case a library was > changed. > > > > I am curious: Do you also see those weird runtime paths on your ptxdist > > > projects or is there something wrong with my toolchain / bsp build? > > > > I saw these search paths on almost every system, independent of the > > distribution (embedded or not). > > Maybe we could add a rule to ptxdist to run ldconfig by default on the > target? Assuming that saving syscalls is beneficial for everybody?
rc.once would be the right tool for the job. I never bothered with it because when starting an app with cold caches the startup time difference was barely measurable. Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de