If I include prelink on the image by adding IMAGE_INSTALL_append= " prelink " and I try to run prelink on the qemux86-64 target it fails with: root@qemux86-64:~# prelink --verify --md5 /bin/busybox.nosuid prelink: /bin/busybox.nosuid: Using /lib/ld-linux-x86-64.so.2, not /lib64/ld-linux-x86-64.so.2 as dynamic linker prelink: /bin/busybox.nosuid disappeared while running --verify On qemux86 it works correctly and looks like: root@qemux86:~# prelink --verify --md5 /bin/busybox.nosuid 29fa665f1beb95a98422ef522dec2b3a /bin/busybox.nosuid
Can you please retest and enable the LSB library paths? Specifically: require conf/multilib.conf MULTILIBS = "" I suspect the problem is that not using proper LSB paths is confusing the prelinker's internal RTLD. In the cross install, there is code that is specifically passing in the libc ld.so path into the RTLD to avoid that issue.
Tried/Verified. Adding: require conf/multilib.conf MULTILIBS = "" to meta/classes/image-prelink.bbclass resulted in a qemux86-64 target that could successfully run : prelink --verify --md5 /bin/busybox.nosuid It also continued to work for qemux86. Mark, is this generic enough to be ok as a patch?
OE will not accept the change. They want the ability to specify an arbitrary (within reason) libdir, that may not conform to LSB guidelines. The prelink RTLD utility is expecting LSB style path names to the ld.so executable. If this is not present, then the (target) absolute path to the ld.so must be passed in (similarly to how the cross processing does) as: prelink <args> --dynamic-linker <path to loader> The 'linuxloader.bbclass' has a list of the known loaders paths. One way to deal with this could be a wrapper script to prelink (for the target)... another solution could simply be to document what is required.
Hmm, I guess I'd lean toward the docs as I shy away from obscuring things like this. Something is not working when I try the change we would document, however. ----- First I removied: require conf/multilib.conf MULTILIBS = "" ------ Then I got the expected: root@qemux86-64:~# prelink --verify --md5 /bin/bash prelink: /bin/bash: Using /lib/ld-linux-x86-64.so.2, not /lib64/ld-linux-x86-64.so.2 as dynamic linker prelink: /bin/bash disappeared while running --verify ------ Then I tried this root@qemux86-64:~# prelink --verify --md5 --dynamic-linker=/lib/ld-linux-x86-64.so.2 /bin/bash prelink: /bin/bash: Could not parse `/usr/sbin//prelink-rtld: error while loading shared libraries: libdl.so.2' prelink: /bin/bash: at least one of file's dependencies has changed since prelinking and it still failed for me. Is there something additional I should specify on the target to have it work there ?
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=47abf987ad3bde11d1019596a71028560535e4cc