From: Mark Hatle <mark.hatle@windriver.com>
To: Florian Boehmak <florian@fnbk.cc>
Cc: yocto@yoctoproject.org
Subject: Re: [prelink-cross] error while loading shared libraries: ld-linux.so.3
Date: Wed, 17 Jun 2015 15:35:36 -0500 [thread overview]
Message-ID: <5581DA18.4080803@windriver.com> (raw)
In-Reply-To: <CALgoR9N55VS2D+UzMmdShBUmQBes_tEj8KqTi7Ff9UtO8pV7Mw@mail.gmail.com>
On 6/16/15 5:56 PM, Florian Boehmak wrote:
>> The error indicates that it found a library required called 'ld-linux.so.3', but
>> could not find that in the "path". (The path generally being the sysroot path
>> passed to the rtld.)
>
> I tried to move the files to their location in sysroot:
>
> arm-2012.03/arm-none-linux-gnueabi/libc/usr/local/include/world.h
> arm-2012.03/arm-none-linux-gnueabi/libc/usr/local/lib/libworld.so
> arm-2012.03/arm-none-linux-gnueabi/libc/usr/local/bin/hello
> arm-2012.03/arm-none-linux-gnueabi/libc/etc/prelink.conf
>
>
>> What command did you use to run the prelinker? And does your sysroot contain
>> the /lib/ld-linux.so.3?
>
> prelink command:
>
> PATH=/usr/local/sbin prelink --verbose
> --root=arm-2012.03/arm-none-linux-gnueabi/libc
> --cache-file=/etc/cache/prelink.cache --config-file=/etc/prelink.conf
> --ld-library-path="/usr/local/lib;/lib;/usr/lib;" -h /usr/local/bin/hello
>
/usr/local/bin/hello is going to look at the absolute location, not that patch
within that specific sysroot. Any files passed in should have the on-host path
names specified. This allows for you to prelink an app based on rootfs where
the app is not present.
The normal mechanism used by the Yocto Project is:
[path]/prelink --root ${IMAGE_ROOTFS} -amR -N -c /etc/prelink.conf
This will process the entire contents of the IMAGE_ROOTFS.
--Mark
> error message:
>
> prelink: /lib/libdl-2.15.so <http://libdl-2.15.so> is not present in any config
> file directories, nor was specified on command line
> prelink: /lib/libc-2.15.so <http://libc-2.15.so> is not present in any config
> file directories, nor was specified on command line
> prelink: /lib/libgcc_s.so.1 is not present in any config file directories, nor
> was specified on command line
> prelink: /lib/ld-2.15.so <http://ld-2.15.so> is not present in any config file
> directories, nor was specified on command line
> Laying out 1 libraries in virtual address space 41000000-50000000
> Assigned virtual address space slots for libraries:
> /usr/local/lib/libworld.so 41000000-410086d0
> prelink: Could not prelink /usr/lib/bin/localedef because its dependency
> /lib/libc.so.6 could not be prelinked
> prelink: Could not prelink /usr/lib/bin/POSIX_V6_ILP32_OFFBIG because its
> dependency /lib/libc.so.6 could not be prelinked
> prelink: Could not prelink /usr/lib/bin/zdump because its dependency
> /lib/libc.so.6 could not be prelinked
> prelink: Could not prelink /usr/lib/bin/POSIX_V7_ILP32_OFF32 because its
> dependency /lib/libc.so.6 could not be prelinked
> prelink: Could not prelink /usr/local/lib/libworld.so because its dependency
> /lib/libgcc_s.so.1 could not be prelinked
> prelink: Could not prelink /usr/local/bin/hello because its dependency
> /usr/local/lib/libworld.so could not be prelinked
> prelink: Could not prelink /usr/lib/bin/pldd because its dependency
> /lib/libc.so.6 could not be prelinked
> prelink: Could not prelink /usr/lib/bin/zic because its dependency
> /lib/libc.so.6 could not be prelinked
> prelink: Could not prelink /usr/lib/bin/sprof because its dependency
> /lib/libdl.so.2 could not be prelinked
> prelink: Could not prelink /usr/lib/bin/POSIX_V6_ILP32_OFF32 because its
> dependency /lib/libc.so.6 could not be prelinked
> prelink: Could not prelink /usr/lib/bin/gdbserver because its dependency
> /lib/libdl.so.2 could not be prelinked
> prelink: Could not prelink /usr/lib/bin/XBS5_ILP32_OFFBIG because its dependency
> /lib/libc.so.6 could not be prelinked
> prelink: Could not prelink /usr/lib/bin/XBS5_ILP32_OFF32 because its dependency
> /lib/libc.so.6 could not be prelinked
> prelink: Could not prelink /usr/lib/bin/makedb because its dependency
> /lib/libc.so.6 could not be prelinked
> prelink: Could not prelink /usr/lib/bin/pcprofiledump because its dependency
> /lib/libc.so.6 could not be prelinked
> prelink: Could not prelink /usr/lib/bin/iconv because its dependency
> /lib/libc.so.6 could not be prelinked
> prelink: Could not prelink /usr/lib/bin/locale because its dependency
> /lib/libc.so.6 could not be prelinked
> prelink: Could not prelink /usr/lib/bin/gencat because its dependency
> /lib/libc.so.6 could not be prelinked
> prelink: Could not prelink /usr/lib/bin/POSIX_V7_ILP32_OFFBIG because its
> dependency /lib/libc.so.6 could not be prelinked
> prelink: Could not prelink /usr/lib/bin/rpcgen because its dependency
> /lib/libc.so.6 could not be prelinked
> prelink: Could not prelink /usr/lib/bin/getent because its dependency
> /lib/libc.so.6 could not be prelinked
> prelink: Could not prelink /usr/lib/bin/getconf because its dependency
> /lib/libc.so.6 could not be prelinked
> prelink: Could not prelink /usr/lib/bin/iconvconfig because its dependency
> /lib/libc.so.6 could not be prelinked
>
>
> prelink.conf
>
> -l /lib
> -h /lib
> -l /usr/lib
> -h /usr/lib
> -l /usr/local/lib
> -h /usr/local/lib
>
>
> Now there is no error message from rtld and libworld.so seems to be found. But
> what's the problem with the folling libraries?
>
> libdl-2.15.so <http://libdl-2.15.so>
> libc-2.15.so <http://libc-2.15.so>
> libgcc_s.so.1
> ld-2.15.so <http://ld-2.15.so>
>
>
> I can see them in this folder arm-2012.03/arm-none-linux-gnueabi/libc/lib:
>
> -rwxr-xr-x 1 developer users 177212 10. Jun 18:43 ld-2.15.so <http://ld-2.15.so>
> lrwxrwxrwx 1 developer users 10 10. Jun 18:43 ld-linux.so.3 -> ld-2.15.so
> <http://ld-2.15.so>
> -rwxr-xr-x 1 developer users 1777390 10. Jun 18:43 libc-2.15.so
> <http://libc-2.15.so>
> lrwxrwxrwx 1 developer users 12 10. Jun 18:43 libc.so.6 -> libc-2.15.so
> <http://libc-2.15.so>
> -rwxr-xr-x 1 developer users 26841 10. Jun 18:43 libdl-2.15.so
> <http://libdl-2.15.so>
> lrwxrwxrwx 1 developer users 13 10. Jun 18:43 libdl.so.2 -> libdl-2.15.so
> <http://libdl-2.15.so>
> -rw-r--r-- 1 developer users 135 10. Jun 18:43 libgcc_s.so
> -rw-r--r-- 1 developer users 3190583 10. Jun 18:43 libgcc_s.so.1
> lrwxrwxrwx 1 developer users 13 10. Jun 18:43 libld-linux.so.3 -> ld-linux.so.3
>
>
>
> I have also put the code on github for reference. Where is the mistake? - I
> think we are almost there :-)
> https://github.com/fnbk/prelink-cross-example/tree/shared-library
>
>
> Greetings
> Florian
>
>
>
next prev parent reply other threads:[~2015-06-17 20:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-16 7:01 [prelink-cross] error while loading shared libraries: ld-linux.so.3 Florian Boehmak
2015-06-16 19:12 ` Mark Hatle
2015-06-16 22:56 ` Florian Boehmak
2015-06-17 13:28 ` Florian Boehmak
2015-06-17 20:35 ` Mark Hatle [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-06-16 16:39 Florian Boehmak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5581DA18.4080803@windriver.com \
--to=mark.hatle@windriver.com \
--cc=florian@fnbk.cc \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.